Skip to content

lang: add locals and assignments #157

lang: add locals and assignments

lang: add locals and assignments #157

Workflow file for this run

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
# run the language-related chores first, so that language definition errors
# are reported early and only once
needs: [languages]
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 IL grammar"
run: bin/passtool verify passes lang10
- name: "Check the source language grammar"
run: bin/passtool verify spec spec