github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/.github/workflows/nix.yml (about) 1 name: Nix 2 3 on: 4 pull_request: 5 push: 6 branches: 7 - dev 8 - release 9 10 concurrency: 11 group: ${{ github.workflow }}-${{ github.ref }} 12 cancel-in-progress: true 13 14 jobs: 15 nix-test: 16 runs-on: ubuntu-latest 17 steps: 18 - name: Checkout 19 uses: actions/checkout@v4 20 - name: Pull musl 21 run: | 22 git submodule update --init lib/musl 23 - name: Restore LLVM source cache 24 uses: actions/cache/restore@v4 25 id: cache-llvm-source 26 with: 27 key: llvm-source-17-linux-nix-v1 28 path: | 29 llvm-project/compiler-rt 30 - name: Download LLVM source 31 if: steps.cache-llvm-source.outputs.cache-hit != 'true' 32 run: make llvm-source 33 - name: Save LLVM source cache 34 uses: actions/cache/save@v4 35 if: steps.cache-llvm-source.outputs.cache-hit != 'true' 36 with: 37 key: ${{ steps.cache-llvm-source.outputs.cache-primary-key }} 38 path: | 39 llvm-project/compiler-rt 40 - uses: cachix/install-nix-action@v22 41 - name: Test 42 run: | 43 nix develop --ignore-environment --keep HOME --command bash -c "go install && ~/go/bin/tinygo version && ~/go/bin/tinygo build -o test ./testdata/cgo"