Skip to content

Commit

Permalink
feat: nix github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Anut-py committed Feb 4, 2024
1 parent 9cfc9d9 commit fac6f9a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: cabal-build

on:
push:
Expand All @@ -10,7 +10,7 @@ permissions:
contents: read

jobs:
build:
cabal-build:
name: GHC ${{ matrix.ghc-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/nix-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: nix-build

on:
push:
branches: master
pull_request:
branches: master

permissions:
contents: read

jobs:
nix-build:
name: Nix on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Nix
uses: cachix/install-nix-action@v22
id: setup

- name: Install dependencies on ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install -y x11proto-xext-dev libx11-dev xorg-dev freeglut3-dev
- name: Build
run: nix build

0 comments on commit fac6f9a

Please sign in to comment.