这是indexloc提供的服务,不要输入任何密码
Skip to content

Use Nix in CI

Use Nix in CI #3265

Workflow file for this run

name: 80ch
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
jobs:
build:
if: ${{ ! contains( github.event.pull_request.labels.*.name, 'skip 80ch') }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout the OxCaml repo
uses: actions/checkout@master
- name: Checkout the parent branch
run: git fetch origin HEAD --deepen 1
- name: Install Nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Cache Nix store
uses: actions/cache@v4
with:
path: |
~/.nix-profile
~/.nix-defexpr
~/.nix-channels
/nix/store
key: ${{ runner.os }}-nix-${{ matrix.name }}-${{ hashFiles('default.nix') }}
restore-keys: |
${{ runner.os }}-nix-${{ matrix.name }}-
${{ runner.os }}-nix-
- name: Check for new >80 character lines
run: nix-shell --run "exec .github/workflows/80ch.sh"