2024-11-21 15:06:53 +00:00
|
|
|
name: Build'n check
|
2024-07-01 17:14:48 +00:00
|
|
|
run-name: Performing Typst compilation
|
2024-11-21 15:06:53 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2024-07-01 14:17:54 +00:00
|
|
|
jobs:
|
2024-07-01 17:14:48 +00:00
|
|
|
run-ci-linux:
|
2024-07-01 14:17:54 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-11-21 15:06:53 +00:00
|
|
|
if: >
|
2024-11-21 15:08:46 +00:00
|
|
|
contains(github.event.head_commit.message, 'Run-Checks') ||
|
2024-11-21 15:06:53 +00:00
|
|
|
github.event_name == 'pull_request'
|
2024-07-01 14:17:54 +00:00
|
|
|
steps:
|
2024-07-01 17:14:48 +00:00
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v3
|
2024-08-27 17:36:24 +00:00
|
|
|
- name: Install dependencies for Nix setup action
|
|
|
|
run: |
|
|
|
|
apt update -y
|
|
|
|
apt install sudo -y
|
2024-07-08 20:58:13 +00:00
|
|
|
- name: Setup Nix
|
2024-08-27 17:34:46 +00:00
|
|
|
uses: cachix/install-nix-action@v27
|
2024-07-08 20:56:56 +00:00
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
2024-11-21 15:06:53 +00:00
|
|
|
- name: Stylecheck
|
|
|
|
run: nix-shell --run "./run-fmt.sh --check src/lib.typ"
|
|
|
|
- id: build
|
|
|
|
name: Build
|
|
|
|
run: |
|
|
|
|
nix-shell --run ./run-ci.sh
|