Skip to content

matrix

matrix #90

Workflow file for this run

name: Test images
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
nix:
strategy:
fail-fast: false
matrix:
include:
- dockerArch: "amd64"
sysArch: "x86_64-linux"
crossArch: "aarch64-unknown-linux-gnu"
- dockerArch: "amd64"
sysArch: "x86_64-linux"
crossArch: "x86_64-unknown-linux-gnu"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
install_url: https://releases.nixos.org/nix/nix-2.19.0/install
nix_path: nixpkgs=channel:nixos-unstable
- run: |
nix-build nix/cross-image.nix \
--argstr dockerArch ${{ matrix.dockerArch }} \
--argstr sysArch ${{ matrix.sysArch }} \
--argstr crossArch ${{ matrix.crossArch }}
- run: docker load < result
- run: docker images
- uses: actions/upload-artifact@v3
with:
name: image-${{ matrix.dockerArch }}-${{ matrix.sysArch }}-${{ matrix.crossArch }}
path: result