From 7eb92ca6be9b215d382304df356a43daadfb7f4f Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Tue, 22 Oct 2024 11:57:26 +0200 Subject: [PATCH] Add Nix to CI --- .github/workflows/nix.yml | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/nix.yml diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml new file mode 100644 index 0000000..a2be1d1 --- /dev/null +++ b/.github/workflows/nix.yml @@ -0,0 +1,45 @@ +name: Test Nix + +on: + push: + branches: + - "**" + +jobs: + test: + strategy: + fail-fast: false + matrix: + platform: + - os: darwin + cpu: x86_64 + base: macos-13 # always x86_64-darwin + - os: darwin + cpu: arm64 + base: macos-14 # always arm64-darwin + - os: linux + cpu: x86_64 + base: ubuntu-24.04 # always x86_64-linux-gnu + - os: linux + cpu: aarch64 + base: arm-4core-linux # always aarch64-linux-gnu + nix: + - 24.05 + + name: Test Nix (${{ matrix.platform.cpu }}-${{ matrix.platform.os }}, ${{ matrix.nix }}) + runs-on: ${{ matrix.platform.base }} + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Print ruby version + run: | + nix develop --command which ruby + nix develop --command ruby --version + - name: Bundle install + run: nix develop --command bundle install