forked from NomicFoundation/slang
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (45 loc) · 1.69 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
47
48
49
50
51
52
53
54
55
56
57
58
name: "ci"
on:
# Run when invoked from other workflows:
workflow_call: {}
# Run using manual triggers from GitHub UI:
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch: {}
# Run on every pull request:
pull_request: {}
# Run on pushes to any branch except 'main', which is handled by the 'publish' workflow:
push:
branches-ignore:
- "main"
# In the event that there is a new push to the ref, cancel any running jobs because they are now obsolete, wasting resources.
concurrency:
group: "${{ github.workflow }}-${{ github.ref_name }}"
cancel-in-progress: true
jobs:
ci:
runs-on: "ubuntu-22.04" # _SLANG_DEV_CONTAINER_BASE_IMAGE_ (keep in sync)
steps:
- name: "Checkout Repository"
uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332"
# Cache is updated in this workflow, and reused in subsequent workflows.
# Always start with a fresh cache when running on the main branch.
- name: "Restore Cache"
if: "${{ github.ref_name != 'main' }}"
uses: "./.github/actions/cache/restore"
#
# Run all CI steps in order: _SLANG_INFRA_CI_STEPS_ORDERED_ (keep in sync)
#
- name: "infra check"
uses: "./.github/actions/devcontainer/run"
with:
runCmd: "./scripts/bin/infra check"
- name: "infra test"
uses: "./.github/actions/devcontainer/run"
with:
runCmd: "./scripts/bin/infra test"
- name: "infra lint"
uses: "./.github/actions/devcontainer/run"
with:
runCmd: "./scripts/bin/infra lint"
- name: "Save Cache"
uses: "./.github/actions/cache/save"