build(nix): update flake lock #1277
This file contains 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 | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
rust-hello: | |
strategy: | |
matrix: | |
config: | |
# Linux | |
- os: ubuntu-22.04 | |
package: default | |
test-bin: ./result/bin/rust-hello | |
- os: ubuntu-22.04 | |
package: rust-hello | |
test-bin: ./result/bin/rust-hello | |
- os: ubuntu-22.04 | |
package: rust-hello-aarch64-unknown-linux-musl | |
test-bin: nix shell --inputs-from . 'nixpkgs#qemu' -c qemu-aarch64 ./result/bin/rust-hello | |
test-oci: docker load < ./result | |
- os: ubuntu-22.04 | |
package: rust-hello-wasm32-wasi | |
test-bin: nix run --inputs-from . 'nixpkgs#wasmtime' ./result/bin/rust-hello | |
test-oci: docker load < ./result | |
- os: ubuntu-22.04 | |
package: rust-hello-x86_64-unknown-linux-musl | |
test-bin: ./result/bin/rust-hello | |
test-oci: | | |
docker load < ./result | |
docker run --rm rust-hello:$(nix eval --raw --override-input 'nixify' '.' ./examples/rust-hello#rust-hello-x86_64-unknown-linux-musl-oci.imageTag) | |
- os: ubuntu-22.04 | |
package: rust-hello-debug | |
test-bin: ./result/bin/rust-hello | |
- os: ubuntu-22.04 | |
package: rust-hello-debug-aarch64-unknown-linux-musl | |
test-bin: nix shell --inputs-from . 'nixpkgs#qemu' -c qemu-aarch64 ./result/bin/rust-hello | |
test-oci: docker load < ./result | |
- os: ubuntu-22.04 | |
package: rust-hello-debug-wasm32-wasi | |
test-bin: nix run --inputs-from . 'nixpkgs#wasmtime' ./result/bin/rust-hello | |
test-oci: docker load < ./result | |
- os: ubuntu-22.04 | |
package: rust-hello-debug-x86_64-unknown-linux-musl | |
test-bin: ./result/bin/rust-hello | |
test-oci: | | |
docker load < ./result | |
docker run --rm rust-hello:$(nix eval --raw --override-input 'nixify' '.' ./examples/rust-hello#rust-hello-x86_64-unknown-linux-musl-oci.imageTag) | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v20 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ github.token }} | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: enarx | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- run: nix build -L --show-trace --override-input 'nixify' '.' './examples/rust-hello#${{ matrix.config.package }}' | |
- run: ${{ matrix.config.test }} | |
- run: nix build -L --show-trace --override-input 'nixify' '.' './examples/rust-hello#${{ matrix.config.package }}-oci' | |
if: ${{ matrix.config.package != 'default' && matrix.config.package != 'rust-hello' && matrix.config.package != 'rust-hello-debug' }} | |
- run: ${{ matrix.config.test-oci }} |