-
Notifications
You must be signed in to change notification settings - Fork 9
46 lines (37 loc) · 1.2 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Copyright lowRISC contributors.
# SPDX-License-Identifier: Apache-2.0
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
# Cancel existing runs if a pull request is pushed.
# For branch pushes, this will queue a new run and cancel the existing one. This allows the cache
# of the run to be used by the new run.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
checks:
name: Quality Check
runs-on: nixos-24.05
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Nix
uses: cachix/install-nix-action@v24
- name: Nix Format Check
run: nix fmt -- . --check
- name: Run Lints
run: nix run .?submodules=1#lint-all
- name: Build Software
run: |
nix build -L .?submodules=1#sonata-exercises
nix build -L .?submodules=1#sonata-examples
nix build -L .?submodules=1#sonata-automotive-demo-legacy-component
nix build -L .?submodules=1#sonata-tests
- name: Run Nix Checks
run: nix flake check -L .?submodules=1