A cross-platform simulator for the GreenArrays GA144 multi-computer chip.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix targets to match host OS

Also make the coverage step it's own job - only need to run that once.

+51 -25
+40 -15
.github/workflows/main.yml
··· 12 12 strategy: 13 13 fail-fast: false 14 14 matrix: 15 - os: [ubuntu-latest] 16 - target: [ 17 - aarch64-linux-gnu, 18 - aarch64-linux-musl, 19 - x86_64-linux-gnu, 20 - x86_64-linux-musl, 21 - aarch64-macos, 22 - x86_64-macos, 23 - x86_64-windows-gnu 24 - ] 15 + os: [ubuntu-latest, macos-latest] 16 + include: 17 + - os: ubuntu-latest 18 + target: x86_64-linux-musl 19 + - os: macos-latest 20 + target: aarch64-macos 25 21 runs-on: ${{ matrix.os }} 26 22 steps: 27 23 - name: Checkout code ··· 37 33 38 34 - run: nix develop -c zig env 39 35 40 - - name: Run zig fmt 41 - if: matrix.os == 'ubuntu-latest' 42 - run: nix develop -c zig fmt --check . 36 + - name: Run tests 37 + run: nix develop -c zig build test -Dtarget=${{ matrix.target }} --summary all 38 + 39 + build-windows: 40 + runs-on: windows-latest 41 + steps: 42 + - name: Checkout code 43 + uses: actions/checkout@v4 44 + 45 + - uses: mlugg/setup-zig@v1 46 + with: 47 + version: "0.14.0" 48 + 49 + - run: zig env 50 + 51 + - name: Run tests 52 + run: zig build test -Dtarget=x86_64-windows-gnu --summary all 53 + 54 + coverage: 55 + runs-on: ubuntu-latest 56 + steps: 57 + - name: Checkout code 58 + uses: actions/checkout@v4 59 + 60 + # Install Nix and use that to run our tests so our environment matches exactly. 61 + - uses: cachix/install-nix-action@v31 62 + with: 63 + nix_path: nixpkgs=channel:nixos-unstable 64 + 65 + # Run our checks to catch quick issues 66 + - run: nix flake check 67 + 68 + - run: nix develop -c zig env 43 69 44 70 - name: Run tests with coverage 45 - run: nix develop -c zig build test -Dcoverage -Dtarget=${{ matrix.target }} --summary all 71 + run: nix develop -c zig build test -Dcoverage -Dtarget=x86_64-linux-musl --summary all 46 72 47 73 - name: Upload to Codecov 48 74 uses: codecov/codecov-action@v5 ··· 50 76 directory: zig-out/coverage/kcov-merged 51 77 fail_ci_if_error: true 52 78 verbose: true 53 -
+6 -6
flake.lock
··· 56 56 }, 57 57 "nixpkgs": { 58 58 "locked": { 59 - "lastModified": 1742072093, 60 - "narHash": "sha256-2aEgxL5RSzNHWFLWEUFXZhkVEYDOuVSXQBiOonzT/Kg=", 59 + "lastModified": 1742596159, 60 + "narHash": "sha256-SH9ein8zlFHD1xk/se3OXE3ZuxGHNyY8DlVb0fFj/bg=", 61 61 "owner": "nixos", 62 62 "repo": "nixpkgs", 63 - "rev": "f182029bf7f08a57762b4c762d0917b6803ceff4", 63 + "rev": "904178ac5c12ff07a359fbb20453a977f0b7effd", 64 64 "type": "github" 65 65 }, 66 66 "original": { ··· 101 101 ] 102 102 }, 103 103 "locked": { 104 - "lastModified": 1742085266, 105 - "narHash": "sha256-dF+9ptTay1hu8nSxn5rFBILUwQPGDrJ9lXwo2hCianE=", 104 + "lastModified": 1742559123, 105 + "narHash": "sha256-hIODf8UGo/fbK5LDx+Ese4Jt9n5FZjwZvYCM70HtO8A=", 106 106 "owner": "mitchellh", 107 107 "repo": "zig-overlay", 108 - "rev": "0dc9ae60eda504251aa2fb4304720a4aaea66b88", 108 + "rev": "bd5dc568a93b43b78aadb11a3a585c6e30333199", 109 109 "type": "github" 110 110 }, 111 111 "original": {
+5 -4
flake.nix
··· 29 29 target = builtins.replaceStrings ["darwin"] ["macos"] system; 30 30 in { 31 31 devShells.${system}.default = pkgs.mkShell { 32 - nativeBuildInputs = with pkgs; [ 33 - kcov 34 - zig 35 - ]; 32 + nativeBuildInputs = with pkgs; 33 + [ 34 + zig 35 + ] 36 + ++ (pkgs.lib.optionals pkgs.stdenv.isLinux [kcov]); 36 37 }; 37 38 38 39 formatter.${system} = pkgs.alejandra;