|
32 | 32 | - variant: gnu |
33 | 33 | - variant: musl |
34 | 34 | name: Merge image / ${{matrix.variant}} |
35 | | - runs-on: ubuntu-latest |
| 35 | + runs-on: ubuntu-24.04-riscv |
36 | 36 | permissions: |
37 | 37 | id-token: write |
38 | 38 | contents: read |
@@ -111,49 +111,20 @@ jobs: |
111 | 111 | fail-fast: false |
112 | 112 | matrix: |
113 | 113 | include: |
114 | | - - target: x86_64-unknown-linux-gnu |
115 | | - platform: linux/amd64 |
| 114 | + - target: riscv64-unknown-linux-gnu |
| 115 | + platform: linux/riscv64 |
116 | 116 | suffix: "" |
117 | 117 | build_env: "" |
118 | | - - target: x86_64-unknown-linux-musl |
119 | | - platform: linux/amd64 |
120 | | - suffix: "-alpine" |
121 | | - build_env: "" |
122 | | - - target: aarch64-unknown-linux-gnu |
123 | | - platform: linux/arm64 |
124 | | - suffix: "" |
125 | | - build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16 " |
126 | | - - target: aarch64-unknown-linux-musl |
127 | | - platform: linux/arm64 |
128 | | - suffix: "-alpine" |
129 | | - build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16 " |
130 | | - - target: armv7-unknown-linux-gnueabihf |
131 | | - platform: linux/arm/v7 |
132 | | - suffix: "" |
133 | | - build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16 " |
134 | | - - target: armv7-unknown-linux-musleabihf |
135 | | - platform: linux/arm/v7 |
136 | | - suffix: "-alpine" |
137 | | - build_env: "JEMALLOC_SYS_WITH_LG_PAGE=16 " |
138 | | - - target: arm-unknown-linux-gnueabihf |
139 | | - platform: linux/arm/v6 |
140 | | - suffix: "" |
141 | | - build_env: "" |
142 | | - - target: arm-unknown-linux-musleabihf |
143 | | - platform: linux/arm/v6 |
| 118 | + - target: riscv64-unknown-linux-musl |
| 119 | + platform: linux/riscv64 |
144 | 120 | suffix: "-alpine" |
145 | 121 | build_env: "" |
146 | 122 | name: Build / ${{matrix.target}} |
147 | | - runs-on: ubuntu-latest |
| 123 | + runs-on: ubuntu-24.04-riscv |
148 | 124 | steps: |
149 | 125 | - name: Checkout |
150 | 126 | uses: actions/checkout@v6.0.1 |
151 | 127 |
|
152 | | - - name: Set up QEMU |
153 | | - uses: docker/setup-qemu-action@v3 |
154 | | - with: |
155 | | - platforms: "arm64,arm" |
156 | | - |
157 | 128 | - name: Set up Docker Buildx |
158 | 129 | uses: docker/setup-buildx-action@v3 |
159 | 130 | with: |
@@ -289,96 +260,15 @@ jobs: |
289 | 260 | if-no-files-found: error |
290 | 261 | retention-days: 1 |
291 | 262 |
|
292 | | - windows: |
293 | | - name: Build / ${{matrix.target}} |
294 | | - runs-on: windows-latest |
295 | | - strategy: |
296 | | - fail-fast: false |
297 | | - matrix: |
298 | | - include: |
299 | | - # - target: aarch64-pc-windows-msvc |
300 | | - - target: x86_64-pc-windows-msvc |
301 | | - |
302 | | - steps: |
303 | | - - name: Checkout |
304 | | - uses: actions/checkout@v6.0.1 |
305 | | - |
306 | | - - name: Run sccache-cache |
307 | | - uses: mozilla-actions/sccache-action@v0.0.9 |
308 | | - with: |
309 | | - disable_annotations: true |
310 | | - |
311 | | - - name: Build |
312 | | - run: | |
313 | | - rustup target add ${{matrix.target}} |
314 | | - cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats enterprise" |
315 | | - cargo build --release --target ${{matrix.target}} -p stalwart-cli |
316 | | - mkdir -p artifacts |
317 | | - mv ./target/${{matrix.target}}/release/stalwart.exe ./artifacts/stalwart.exe |
318 | | - mv ./target/${{matrix.target}}/release/stalwart-cli.exe ./artifacts/stalwart-cli.exe |
319 | | -
|
320 | | - - name: Upload Artifacts |
321 | | - uses: actions/upload-artifact@v6 |
322 | | - with: |
323 | | - name: artifact-${{matrix.target}} |
324 | | - path: artifacts |
325 | | - |
326 | | - macos: |
327 | | - name: Build / ${{matrix.target}} |
328 | | - runs-on: macos-latest |
329 | | - strategy: |
330 | | - fail-fast: false |
331 | | - matrix: |
332 | | - include: |
333 | | - - target: aarch64-apple-darwin |
334 | | - - target: x86_64-apple-darwin |
335 | | - steps: |
336 | | - - name: Checkout |
337 | | - uses: actions/checkout@v6.0.1 |
338 | | - |
339 | | - - name: Run sccache-cache |
340 | | - uses: mozilla-actions/sccache-action@v0.0.9 |
341 | | - with: |
342 | | - disable_annotations: true |
343 | | - |
344 | | - #- name: Build FoundationDB Edition |
345 | | - # env: |
346 | | - # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
347 | | - # run: | |
348 | | - # rustup target add ${{matrix.target}} |
349 | | - # # Get latest FoundationDB installer |
350 | | - # curl --retry 5 -Lso foundationdb.pkg "$(gh api -X GET /repos/apple/foundationdb/releases --jq '.[] | select(.prerelease == false) | .assets[] | select(.name | test("${{startsWith(matrix.target, 'x86') && 'x86_64' || 'arm64'}}" + ".pkg$")) | .browser_download_url' | head -n1)" |
351 | | - # echo "=== Package contents ===" |
352 | | - # pkgutil --payload-files foundationdb.pkg || true |
353 | | - # sudo installer -allowUntrusted -verbose -dumplog -pkg foundationdb.pkg -target / |
354 | | - # cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "foundationdb s3 redis nats enterprise" |
355 | | - # mkdir -p artifacts |
356 | | - # mv ./target/${{matrix.target}}/release/stalwart ./artifacts/stalwart-foundationdb |
357 | | - |
358 | | - - name: Build |
359 | | - run: | |
360 | | - rustup target add ${{matrix.target}} |
361 | | - cargo build --release --target ${{matrix.target}} -p stalwart --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats enterprise" |
362 | | - cargo build --release --target ${{matrix.target}} -p stalwart-cli |
363 | | - mkdir -p artifacts |
364 | | - mv ./target/${{matrix.target}}/release/stalwart ./artifacts/stalwart |
365 | | - mv ./target/${{matrix.target}}/release/stalwart-cli ./artifacts/stalwart-cli |
366 | | -
|
367 | | - - name: Upload Artifacts |
368 | | - uses: actions/upload-artifact@v6 |
369 | | - with: |
370 | | - name: artifact-${{matrix.target}} |
371 | | - path: artifacts |
372 | | - |
373 | 263 | release: |
374 | 264 | name: Release |
375 | 265 | permissions: |
376 | 266 | id-token: write |
377 | 267 | contents: write |
378 | 268 | attestations: write |
379 | 269 | if: github.event_name == 'push' || inputs.Release |
380 | | - needs: [linux, windows, macos] |
381 | | - runs-on: ubuntu-latest |
| 270 | + needs: [linux] |
| 271 | + runs-on: ubuntu-24.04-riscv |
382 | 272 | steps: |
383 | 273 | - name: Download Artifacts |
384 | 274 | uses: actions/download-artifact@v7 |
|
0 commit comments