docs: add more cross compile examples #2069
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" | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [ master ] | |
push: | |
branches: [ master ] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install nix | |
uses: cachix/install-nix-action@v30 | |
with: | |
extra_nix_config: | | |
experimental-features = nix-command flakes | |
nix_path: nixpkgs=channel:nixos-unstable | |
- name: Setup cachix | |
uses: cachix/cachix-action@v15 | |
with: | |
name: nix-cargo-integration | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Test checks | |
run: nix flake check -L --show-trace | |
- name: Test numtide devshell integration | |
run: | | |
sed -i 's|github:yusdacra/nix-cargo-integration|path:../..|g' examples/numtide-devshell/flake.nix | |
nix develop -L --show-trace ./examples/numtide-devshell#default -c env | |
- name: Test wasm cross compile | |
run: | | |
sed -i 's|github:yusdacra/nix-cargo-integration|path:../..|g' examples/cross-compile-wasm/flake.nix | |
nix build -L --show-trace ./examples/cross-compile-wasm | |
- name: Test aarch64 cross compile | |
run: | | |
sed -i 's|github:yusdacra/nix-cargo-integration|path:../..|g' examples/cross-compile-aarch64/flake.nix | |
nix build -L --show-trace ./examples/cross-compile-aarch64 | |
- name: Test windows cross compile | |
run: | | |
sed -i 's|github:yusdacra/nix-cargo-integration|path:../..|g' examples/cross-compile-windows/flake.nix | |
nix build -L --show-trace ./examples/cross-compile-windows |