Merge pull request #6 from moneydevkit/austin_dont-run-checks-on-release #22
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| check: | |
| name: Nix Flake Check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v 6.02 | |
| - name: Check Nix flake inputs | |
| uses: DeterminateSystems/flake-checker-action@3164002371bc90729c68af0e24d5aacf20d7c9f6 # v12 | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@c5a866b6ab867e88becbed4467b93592bce69f8a # v21 | |
| - name: Setup Magic Nix Cache | |
| uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13 | |
| - name: Run Nix checks | |
| run: nix flake check --print-build-logs | |
| - name: Run integration tests | |
| run: nix run .#integration-test --print-build-logs | |
| build: | |
| name: Build Static (${{ matrix.arch }}) | |
| if: github.event_name == 'push' | |
| needs: check | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - runner: ubuntu-latest | |
| arch: x86_64-linux | |
| - runner: ubuntu-24.04-arm | |
| arch: aarch64-linux | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v 6.02 | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@c5a866b6ab867e88becbed4467b93592bce69f8a # v21 | |
| with: | |
| extra-conf: | | |
| extra-trusted-substituters = http://127.0.0.1:37515 | |
| - name: Setup Magic Nix Cache | |
| uses: DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13 | |
| - name: Build static binary | |
| run: nix build .#static --print-build-logs | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: mdkd-${{ matrix.arch }} | |
| path: result/bin/mdkd |