-
Notifications
You must be signed in to change notification settings - Fork 16
116 lines (103 loc) · 3.53 KB
/
Copy pathci.yml
File metadata and controls
116 lines (103 loc) · 3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Multi-Arch CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
name: Build (OS=${{ matrix.os }}, Arch=${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, ubuntu-22.04]
arch: [ x86_64 ]
include:
- os: ubuntu-24.04-arm
arch: aarch64
- os: ubuntu-22.04-arm
arch: aarch64
- os: macos-15-intel
arch: x86_64
- os: macos-15
arch: arm64
- os: windows-2022
arch: amd64
steps:
- name: Checkout code
uses: actions/checkout@v4
#####################################
# Dependencies Installation (Optional)
#####################################
# Linux dependencies
- name: Install dependencies (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y build-essential ninja-build cmake git
# If you need system LLVM for something else:
# sudo apt-get install -y clang lld llvm-dev libclang-dev
# macOS dependencies
- name: Install dependencies (macOS)
if: startsWith(matrix.os, 'macos')
run: |
brew update
brew install ninja git
# Windows dependencies
- name: Install dependencies (Windows)
if: startsWith(matrix.os, 'windows')
shell: pwsh
run: |
choco install ninja cmake git -y
- name: Setup MSBuild (Windows)
if: startsWith(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v2
#####################################
# Configure the Superbuild
#####################################
- name: Configure
run: |
cmake -B build -S . -GNinja
shell: bash
#####################################
# Build the Superbuild
#####################################
- name: Build
run: ninja -C build
shell: bash
#####################################
# [Optional] Run Tests
# NOTE: -LE LargeStackRequired is used to skip
# running tests on GitHub CI environment that
# has limited stack allowed.
# The fbracket-depth passes outside of GitHub
# but fails inside Github CI
#####################################
- name: Test
run: |
cd build/castxml-prefix/src/castxml-build
ctest --output-on-failure -LE LargeStackRequired
#####################################
# Package the resulting castxml binary
#####################################
- name: Create Artifact (Windows)
if: startsWith(matrix.os, 'windows')
shell: cmd
run: |
cd build
7z a castxml-${{ matrix.os }}-${{ matrix.arch }}.zip castxml
move castxml-${{ matrix.os }}-${{ matrix.arch }}.zip ..
- name: Create Artifact (Non-Windows)
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
shell: bash
run: |
cd build
tar cvf castxml-${{ matrix.os }}-${{ matrix.arch }}.tar castxml
gzip -9 castxml-${{ matrix.os }}-${{ matrix.arch }}.tar
mv castxml-${{ matrix.os }}-${{ matrix.arch }}.tar.gz ..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: castxml-${{ matrix.os }}-${{ matrix.arch }}
path: ./castxml-${{ matrix.os }}-${{ matrix.arch }}.*