Force usage of LLVM until Zig's backend supports ExportOptions.section #99
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| tags-ignore: | |
| - "**" | |
| pull_request: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| optimize: | |
| description: "Optimization mode" | |
| required: true | |
| type: choice | |
| default: ReleaseSafe | |
| options: | |
| - Debug | |
| - ReleaseSafe | |
| - ReleaseSmall | |
| - ReleaseFast | |
| permissions: | |
| contents: write | |
| env: | |
| OPTIMIZE: ${{ inputs.optimize || 'ReleaseSafe' }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: b3sum | |
| version: 1.0 | |
| - uses: mlugg/setup-zig@v1 | |
| with: | |
| version: 0.15.0-dev.386+2e35fdd03 | |
| - name: "Build" | |
| run: | | |
| zig build build-all -Doptimize=$OPTIMIZE | |
| - name: Hash Artifacts | |
| run: | | |
| sha256sum ./zig-out/lib/* > ./hashes.sha256 | |
| b3sum ./zig-out/lib/* > ./hashes.blake3 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Artifacts | |
| path: | | |
| zig-out/lib/* | |
| hashes.sha256 | |
| hashes.blake3 | |
| if-no-files-found: error | |
| - name: Create release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| zig-out/lib/* | |
| hashes.sha256 | |
| hashes.blake3 | |
| fail_on_unmatched_files: true | |
| - name: Create CI release | |
| if: github.ref == 'refs/heads/master' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| zig-out/lib/* | |
| hashes.sha256 | |
| hashes.blake3 | |
| prerelease: true | |
| tag_name: ci | |
| name: "CI build" | |
| generate_release_notes: true | |
| fail_on_unmatched_files: true |