|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | native-linux: |
11 | | - runs-on: ubuntu-latest |
12 | | - outputs: |
13 | | - rid: ${{ steps.runtime-info.outputs.rid }} |
14 | | - steps: |
15 | | - - name: Checkout |
16 | | - uses: actions/checkout@v4 |
17 | | - with: |
18 | | - fetch-depth: 0 |
19 | | - |
20 | | - - name: Setup .NET |
21 | | - uses: actions/setup-dotnet@v4 |
22 | | - with: |
23 | | - dotnet-version: 8.0.x |
24 | | - |
25 | | - - name: Install dependencies |
26 | | - run: | |
27 | | - sudo apt-get update |
28 | | - sudo apt-get install -y libgtk-3-dev ninja-build clang-format zip |
29 | | -
|
30 | | - - name: Package native artifacts |
31 | | - run: ./build/build.sh Release --skip-dotnet --skip-tests |
32 | | - shell: bash |
33 | | - |
34 | | - - name: Determine runtime identifier |
35 | | - id: runtime-info |
36 | | - run: | |
37 | | - arch="$(uname -m)" |
38 | | - case "${arch}" in |
39 | | - x86_64|amd64) arch="x64" ;; |
40 | | - arm64|aarch64) arch="arm64" ;; |
41 | | - esac |
42 | | - echo "rid=linux-${arch}" >> "${GITHUB_OUTPUT}" |
43 | | - shell: bash |
44 | | - |
45 | | - - name: Upload native artifact |
46 | | - uses: actions/upload-artifact@v4 |
47 | | - with: |
48 | | - name: native-linux |
49 | | - path: artifacts/native-linux-*.zip |
50 | | - if-no-files-found: error |
| 11 | + uses: ./.github/workflows/native-build.yml |
| 12 | + with: |
| 13 | + runner: ubuntu-latest |
| 14 | + configuration: Release |
| 15 | + artifact-name: native-linux |
51 | 16 |
|
52 | 17 | native-linux-arm64: |
53 | | - runs-on: ubuntu-22.04-arm |
54 | | - outputs: |
55 | | - rid: ${{ steps.runtime-info.outputs.rid }} |
56 | | - steps: |
57 | | - - name: Checkout |
58 | | - uses: actions/checkout@v4 |
59 | | - with: |
60 | | - fetch-depth: 0 |
61 | | - |
62 | | - - name: Setup .NET |
63 | | - uses: actions/setup-dotnet@v4 |
64 | | - with: |
65 | | - dotnet-version: 8.0.x |
66 | | - |
67 | | - - name: Install dependencies |
68 | | - run: | |
69 | | - sudo apt-get update |
70 | | - sudo apt-get install -y libgtk-3-dev ninja-build clang-format zip |
71 | | -
|
72 | | - - name: Package native artifacts |
73 | | - run: ./build/build.sh Release --skip-dotnet --skip-tests |
74 | | - shell: bash |
75 | | - |
76 | | - - name: Determine runtime identifier |
77 | | - id: runtime-info |
78 | | - run: | |
79 | | - arch="$(uname -m)" |
80 | | - case "${arch}" in |
81 | | - x86_64|amd64) arch="x64" ;; |
82 | | - arm64|aarch64) arch="arm64" ;; |
83 | | - esac |
84 | | - echo "rid=linux-${arch}" >> "${GITHUB_OUTPUT}" |
85 | | - shell: bash |
86 | | - |
87 | | - - name: Upload native artifact |
88 | | - uses: actions/upload-artifact@v4 |
89 | | - with: |
90 | | - name: native-linux-arm64 |
91 | | - path: artifacts/native-linux-*.zip |
92 | | - if-no-files-found: error |
| 18 | + uses: ./.github/workflows/native-build.yml |
| 19 | + with: |
| 20 | + runner: ubuntu-22.04-arm |
| 21 | + configuration: Release |
| 22 | + artifact-name: native-linux-arm64 |
93 | 23 |
|
94 | 24 | native-macos: |
95 | | - runs-on: macos-latest |
96 | | - outputs: |
97 | | - rid: ${{ steps.runtime-info.outputs.rid }} |
98 | | - steps: |
99 | | - - name: Checkout |
100 | | - uses: actions/checkout@v4 |
101 | | - with: |
102 | | - fetch-depth: 0 |
103 | | - |
104 | | - - name: Setup .NET |
105 | | - uses: actions/setup-dotnet@v4 |
106 | | - with: |
107 | | - dotnet-version: 8.0.x |
108 | | - |
109 | | - - name: Install dependencies |
110 | | - run: | |
111 | | - brew update |
112 | | - brew install gtk+3 ninja clang-format |
113 | | -
|
114 | | - - name: Package native artifacts |
115 | | - run: ./build/build.sh Release --skip-dotnet --skip-tests |
116 | | - shell: bash |
117 | | - |
118 | | - - name: Determine runtime identifier |
119 | | - id: runtime-info |
120 | | - run: | |
121 | | - arch="$(uname -m)" |
122 | | - case "${arch}" in |
123 | | - x86_64|amd64) arch="x64" ;; |
124 | | - arm64|aarch64) arch="arm64" ;; |
125 | | - esac |
126 | | - echo "rid=osx-${arch}" >> "${GITHUB_OUTPUT}" |
127 | | - shell: bash |
128 | | - |
129 | | - - name: Upload native artifact |
130 | | - uses: actions/upload-artifact@v4 |
131 | | - with: |
132 | | - name: native-macos |
133 | | - path: artifacts/native-osx-*.zip |
134 | | - if-no-files-found: error |
| 25 | + uses: ./.github/workflows/native-build.yml |
| 26 | + with: |
| 27 | + runner: macos-latest |
| 28 | + configuration: Release |
| 29 | + artifact-name: native-macos |
135 | 30 |
|
136 | 31 | native-windows: |
137 | | - runs-on: windows-latest |
138 | | - outputs: |
139 | | - rid: ${{ steps.runtime-info.outputs.rid }} |
140 | | - steps: |
141 | | - - name: Checkout |
142 | | - uses: actions/checkout@v4 |
143 | | - with: |
144 | | - fetch-depth: 0 |
145 | | - |
146 | | - - name: Setup .NET |
147 | | - uses: actions/setup-dotnet@v4 |
148 | | - with: |
149 | | - dotnet-version: 8.0.x |
150 | | - |
151 | | - - name: Install dependencies |
152 | | - run: choco install ninja -y |
153 | | - shell: powershell |
154 | | - |
155 | | - - name: Package native artifacts |
156 | | - run: ./build/build.ps1 -Configuration Release -SkipDotnet -SkipTests |
157 | | - shell: pwsh |
158 | | - |
159 | | - - name: Determine runtime identifier |
160 | | - id: runtime-info |
161 | | - shell: pwsh |
162 | | - run: | |
163 | | - $archive = Get-ChildItem -Path artifacts/native-*.zip | Select-Object -First 1 |
164 | | - if (-not $archive) { |
165 | | - throw "Unable to determine runtime identifier: no native archive found under artifacts/" |
166 | | - } |
167 | | - $rid = $archive.BaseName.Substring(7) # trim 'native-' |
168 | | - "rid=$rid" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append |
169 | | -
|
170 | | - - name: Upload native artifact |
171 | | - uses: actions/upload-artifact@v4 |
172 | | - with: |
173 | | - name: native-windows |
174 | | - path: artifacts/native-win-*.zip |
175 | | - if-no-files-found: error |
| 32 | + uses: ./.github/workflows/native-build.yml |
| 33 | + with: |
| 34 | + runner: windows-latest |
| 35 | + configuration: Release |
| 36 | + artifact-name: native-windows |
176 | 37 |
|
177 | 38 | native-windows-arm64: |
178 | | - runs-on: windows-latest |
179 | | - outputs: |
180 | | - rid: ${{ steps.runtime-info.outputs.rid }} |
181 | | - steps: |
182 | | - - name: Checkout |
183 | | - uses: actions/checkout@v4 |
184 | | - with: |
185 | | - fetch-depth: 0 |
186 | | - |
187 | | - - name: Setup .NET |
188 | | - uses: actions/setup-dotnet@v4 |
189 | | - with: |
190 | | - dotnet-version: 8.0.x |
191 | | - |
192 | | - - name: Install dependencies |
193 | | - run: choco install ninja -y |
194 | | - shell: powershell |
195 | | - |
196 | | - - name: Package native artifacts |
197 | | - run: ./build/build.ps1 -Configuration Release -SkipDotnet -SkipTests -Architecture arm64 |
198 | | - shell: pwsh |
199 | | - |
200 | | - - name: Determine runtime identifier |
201 | | - id: runtime-info |
202 | | - shell: pwsh |
203 | | - run: | |
204 | | - $archive = Get-ChildItem -Path artifacts/native-*.zip | Select-Object -First 1 |
205 | | - if (-not $archive) { |
206 | | - throw "Unable to determine runtime identifier: no native archive found under artifacts/" |
207 | | - } |
208 | | - $rid = $archive.BaseName.Substring(7) |
209 | | - "rid=$rid" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append |
210 | | -
|
211 | | - - name: Upload native artifact |
212 | | - uses: actions/upload-artifact@v4 |
213 | | - with: |
214 | | - name: native-windows-arm64 |
215 | | - path: artifacts/native-win-*.zip |
216 | | - if-no-files-found: error |
| 39 | + uses: ./.github/workflows/native-build.yml |
| 40 | + with: |
| 41 | + runner: windows-latest |
| 42 | + configuration: Release |
| 43 | + architecture: arm64 |
| 44 | + artifact-name: native-windows-arm64 |
217 | 45 |
|
218 | 46 | ios-xcframework: |
219 | 47 | runs-on: macos-latest |
|
0 commit comments