Build apps to test the derivations #283
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 apps to test the derivations | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Every day at midnight UTC | |
| push: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| generate-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Generate app matrix | |
| id: set-matrix | |
| run: | | |
| # Get all app names from apks directory structure | |
| apps=$(find apks -mindepth 2 -maxdepth 2 -type d | sed 's|apks/[^/]*/||' | sort | jq -R -s -c 'split("\n")[:-1]') | |
| echo "matrix={\"app-name\":$apps}" >> $GITHUB_OUTPUT | |
| build-app: | |
| needs: generate-matrix | |
| strategy: | |
| matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Nothing but nix | |
| uses: wimpysworld/nothing-but-nix@main | |
| with: | |
| hatchet-protocol: rampage | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| extra_nix_config: | | |
| build-dir = /nix/build | |
| - name: Setup magic nix cache (speed up builds) | |
| uses: DeterminateSystems/magic-nix-cache-action@main | |
| with: | |
| # i am going to fork ts just because of these two options | |
| use-flakehub: disabled | |
| diagnostic-endpoint: "" | |
| - name: Show flake outputs (debug) | |
| run: nix flake show | |
| - name: Build package | |
| run: | | |
| # build the system-specific package produced by the flake | |
| nix build -L ".#${{ matrix.app-name }}" |