Skip to content

try to use reusable workflows from current branch #1

try to use reusable workflows from current branch

try to use reusable workflows from current branch #1

name: Build and test the compiler
on:
workflow_call:
inputs:
os:
required: true
type: string
chapter:
required: true
type: number
jobs:
build:
uses: nlsandler/nqcc2/.github/workflows/build.yaml

Check failure on line 15 in .github/workflows/build_and_test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build_and_test.yaml

Invalid workflow file

invalid value workflow reference: no version specified
with:
chapter: ${{ inputs.chapter }}
os: ${{ inputs.os }}
test:
runs-on: ${{ inputs.os }}
needs: [build]
env:
CHAPTER: ${{ inputs.chapter }}
steps:
- name: Check out tests
uses: actions/checkout@v4
with:
repository: nlsandler/writing-a-c-compiler-tests
ref: complete-test-suite # TODO use main once this is merged
- name: Check out test runner script
uses: actions/checkout@v4
with:
repository: nlsandler/nqcc2
sparse-checkout: |
.github/run-tests.sh
sparse-checkout-cone-mode: false
- name: Download the compiler
uses: actions/download-artifact@v4
with:
name: nqcc-${{inputs.os}}-${{ inputs.chapter }}
path: nqcc
# make NQCC executable
- run: chmod u+x nqcc/main.exe
# Invoke the run-tests script to test each intermediate stage
# use Rosetta on macOS since that's what most readers are doing
- name: Run the tests (Apple Silicon)
if: runner.arch == 'ARM64'
run: arch -x86_64 ./github/run-tests.sh
- name: Run the tests (x86-64)
if: runner.arch != 'ARM64'
run: ./github/run-tests.sh