This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
Update Nix setup and get build working #51
Workflow file for this run
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: Nix + Wasm example project | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
REPO: ${{ github.event.repository.name }} | |
jobs: | |
ci: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v3 | |
- name: Check Nixpkgs input in flake | |
uses: DeterminateSystems/flake-checker-action@v5 | |
with: | |
fail-mode: true | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v10 | |
- name: Set up Magic Nix Cache | |
uses: DeterminateSystems/magic-nix-cache-action@v4 | |
- name: nix flake check | |
run: | | |
nix flake check --all-systems | |
- name: Display package contents | |
run: | | |
nix build ".#hello-wasm-pkg" | |
nix develop --command tree ./result | |
- name: Build all packages | |
run: | | |
for pkg in hello-wasm-pkg hello-wasmedge-exec hello-wasmtime-exec; do | |
nix build ".#${pkg}" | |
done | |
- name: Run scripts | |
run: | | |
nix run ".#hello-wasmedge-exec" | |
nix run ".#hello-wasmtime-exec" |