fix(deps): update all non-major dependencies #869
This file contains hidden or 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: | |
pull_request: | |
push: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- label: x86_64-linux | |
image: ubuntu-latest | |
- label: aarch64-linux | |
image: ubuntu-latest | |
system: aarch64-linux | |
- label: x86_64-darwin | |
image: macos-latest | |
system: x86_64-darwin | |
- label: aarch64-darwin | |
image: macos-latest | |
system: aarch64-darwin | |
name: ${{ matrix.label }} | |
runs-on: ${{ matrix.image }} | |
steps: | |
- uses: actions/[email protected] | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@c723f3a885e3f1d866d91f4f0c33dd44b1fc7c60 # v18 | |
continue-on-error: true # Self-hosted runners already have Nix installed | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 | |
if: matrix.system == 'aarch64-linux' | |
- name: Generate System Flags | |
run: | | |
LOCAL_SYSTEM=$(nix-instantiate --eval --json -E 'builtins.currentSystem' | jq -r) | |
HOST_SYSTEM=${HOST_SYSTEM:-$LOCAL_SYSTEM} | |
if [[ "$LOCAL_SYSTEM" != "$HOST_SYSTEM" ]]; then | |
echo "system_flags=--system $HOST_SYSTEM" >>"$GITHUB_ENV" | |
echo "extra-platforms = $HOST_SYSTEM" | sudo tee -a /etc/nix/nix.conf | |
fi | |
env: | |
HOST_SYSTEM: '${{ matrix.system }}' | |
- name: Enable Binary Cache | |
uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16 | |
with: | |
name: colmena | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Build Colmena | |
run: nix build -L $system_flags | |
- name: Build manual | |
run: nix build .#manual -L | |
nix-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/[email protected] | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@c723f3a885e3f1d866d91f4f0c33dd44b1fc7c60 # v18 | |
continue-on-error: true # Self-hosted runners already have Nix installed | |
- name: Enable Binary Cache | |
uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16 | |
with: | |
name: colmena | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- id: set-matrix | |
name: Generate Nix Matrix | |
run: | | |
set -Eeu | |
matrix="$(nix eval --json '.#githubActions.matrix')" | |
echo "matrix=$matrix" >> "$GITHUB_OUTPUT" | |
nix-matrix-job: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
needs: | |
- build | |
- nix-matrix | |
strategy: | |
matrix: ${{ fromJSON(needs.nix-matrix.outputs.matrix) }} | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master | |
with: | |
remove-dotnet: 'true' | |
build-mount-path: /nix | |
- name: Set /nix permissions | |
run: | | |
sudo chown root:root /nix | |
- uses: actions/[email protected] | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@c723f3a885e3f1d866d91f4f0c33dd44b1fc7c60 # v18 | |
continue-on-error: true # Self-hosted runners already have Nix installed | |
- name: Enable Binary Cache | |
uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16 | |
with: | |
name: colmena | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: Build ${{ matrix.attr }} | |
run: | | |
nix build --no-link --print-out-paths -L '.#${{ matrix.attr }}' |