implement a language with a Record
and Array
type
#39
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |