Skip to content

Bump actions/checkout from 3 to 4 #2

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #2

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request_target:
workflow_dispatch:
jobs:
nix:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
ghc:
- "9.4.8"
steps:
# https://github.com/dependabot/dependabot-core/issues/3253#issuecomment-799466911
- uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v4
if: ${{ github.event_name != 'pull_request_target' }}
- name: Free disk space (Ubuntu only)
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
- name: Set nix path
id: nix-path
run: |
echo ::set-output name=nixpkgs::$(jq -r .nixpkgs.url ./nix/sources.json)
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=${{ steps.nix-path.outputs.nixpkgs }}
extra_nix_config: |
log-lines = 1000
# - uses: cachix/cachix-action@v12
# with:
# name: nixkell
# authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Nix Shell
run: |
nix-shell --run "echo OK"
- name: Check code formatting
if: ${{runner.os == 'Linux'}}
run: |
nix-shell --run "treefmt --fail-on-change"
- name: Build
run: |
nix-build ./nix/release.nix --argstr compiler ${{ matrix.ghc }}
- name: Run
run: |
result/bin/nixkell