-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (77 loc) · 2.12 KB
/
build_and_test.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Build and test
on:
# run on push...
push:
# ... but ignore the main and temporary merge queue branches
branches-ignore:
- main
- gh-readonly-queue/**
pull_request:
# only run for PRs to main
branches:
- main
# only consider certain events
type:
- opened
- synchronize
- reopened
- ready_for_review
merge_group:
# run when something enters the merge queue
# use bash for all script actions
defaults:
run:
shell: bash
jobs:
binaries:
strategy:
fail-fast: false
matrix:
target:
- name: Linux
runner: ubuntu-20.04
- name: MacOS (M1)
runner: macos-14
- name: MacOS
runner: macos-12
- name: Windows
runner: windows-2022
name: "Build binaries (${{ matrix.target.name }})"
runs-on: ${{ matrix.target.runner }}
steps:
- uses: actions/checkout@v4
with:
# sparse checkout; we're only interested in the head commit
fetch-depth: 0
filter: tree:0
# always use the most recent NimSkull version
- uses: nim-works/[email protected]
with:
nimskull-version: "*"
- name: Build koch
run: nim c -d:nimStrictMode --outdir:bin koch.nim
- name: Build all programs
run: bin/koch all -d:nimStrictMode -d:release
- name: "Run tests"
run: bin/tester
languages:
name: "Check and generate languages"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
# always use the most recent NimSkull version
- uses: nim-works/[email protected]
with:
nimskull-version: "*"
- name: Build koch
run: nim c -d:nimStrictMode --outdir:bin koch.nim
- name: Build passtool
run: bin/koch single passtool -d:nimStrictMode -d:release
# run the passtool for the highest-level language:
- name: "Check the grammar"
run: |
bin/passtool passes lang3
bin/passtool passes lang_source