Add nix flake for baochip targets #9
Workflow file for this run
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: Nix Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.package }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - dabao-helloworld | |
| - bao1x-boot0 | |
| - bao1x-alt-boot1 | |
| - bao1x-boot1 | |
| # needed for flakehub cache | |
| permissions: | |
| id-token: "write" | |
| contents: "read" | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@main | |
| - name: Setup Nix cache | |
| uses: DeterminateSystems/flakehub-cache-action@v3 | |
| - name: Build ${{ matrix.package }} | |
| run: nix build .#${{ matrix.package }} --print-build-logs | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.package }} | |
| path: result/ | |
| if-no-files-found: error | |
| # Flake health checks | |
| check: | |
| name: Flake check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@main | |
| - name: Setup Nix cache | |
| uses: DeterminateSystems/flakehub-cache-action@v3 | |
| - name: Run flake check | |
| run: nix flake check | |
| - name: Show flake outputs | |
| run: nix flake show |