Skip to content

Commit

Permalink
Add Nix to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lloeki committed Oct 22, 2024
1 parent ac3df27 commit 1f297e5
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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:
- name: Check CPU arch
run: |
test "$(uname -m)" = "${{ matrix.platform.cpu }}"
- 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

0 comments on commit 1f297e5

Please sign in to comment.