add build tag to cache id to avoid duplicate cache ids #163
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: Release Builds | |
| on: push | |
| env: | |
| LLVM_VERSION: "21.1.2" | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: "ubuntu-22.04" | |
| shell: "bash" | |
| LLVM_TARGETS_TO_BUILD: "X86" | |
| - os: "ubuntu-22.04" | |
| shell: "bash" | |
| LLVM_TARGETS_TO_BUILD: "X86" | |
| LLVM_USE_SANITIZER: Thread | |
| BUILD_TAG: "_tsan" | |
| - os: "ubuntu-22.04-arm" | |
| shell: "bash" | |
| LLVM_TARGETS_TO_BUILD: "AArch64" | |
| - os: "macos-13" | |
| shell: "bash" | |
| LLVM_TARGETS_TO_BUILD: "X86" | |
| - os: "macos-14" | |
| shell: "bash" | |
| LLVM_TARGETS_TO_BUILD: "AArch64" | |
| - os: "windows-2022" | |
| shell: "msys2 {0}" | |
| LLVM_TARGETS_TO_BUILD: "X86" | |
| - os: "windows-11-arm" | |
| shell: "msys2 {0}" | |
| LLVM_TARGETS_TO_BUILD: "AArch64" | |
| permissions: | |
| contents: write | |
| defaults: | |
| run: | |
| shell: ${{ matrix.shell }} | |
| env: | |
| LLVM_TARGETS_TO_BUILD: ${{ matrix.LLVM_TARGETS_TO_BUILD }} | |
| LLVM_USE_SANITIZER: ${{ matrix.LLVM_USE_SANITIZER }} | |
| BUILD_TAG: ${{ matrix.BUILD_TAG }} | |
| steps: | |
| - uses: spatial-model-editor/[email protected] | |
| with: | |
| cache_id: ${{ matrix.BUILD_TAG }} | |
| - uses: actions/checkout@v4 | |
| - name: Build script | |
| run: ./build.sh | |
| - name: Upload binaries to release if commit is tagged | |
| if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ./artefacts/* | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| file_glob: true |