Skip to content

Netbsd fix? Probably not... #1942

Netbsd fix? Probably not...

Netbsd fix? Probably not... #1942

Workflow file for this run

on:
push:
branches:
- main
pull_request:
jobs:
bootstrap:
# Please keep in sync with valgrind.yml
timeout-minutes: 10
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the whole Git history
- run: sudo apt update
- run: sudo apt install -y llvm-16-dev clang-16 make
- name: "Select LLVM version"
run: echo "LLVM_CONFIG=llvm-config-16" >> $GITHUB_ENV
- run: ./bootstrap.sh
- uses: actions/upload-artifact@v4
with:
name: bootstrapped
path: jou_bootstrap
test:
needs: bootstrap
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
llvm-version: [14, 15, 16]
# Testing all levels because there was a bug that only happened with -O1. (#224)
opt-level: ['-O0', '-O1', '-O2', '-O3']
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: bootstrapped
- run: chmod +x jou_bootstrap
- run: sudo apt update
- run: sudo apt install -y llvm-${{ matrix.llvm-version }}-dev clang-${{ matrix.llvm-version }} make valgrind
- name: "Select LLVM version"
run: echo "LLVM_CONFIG=llvm-config-${{ matrix.llvm-version }}" >> $GITHUB_ENV
- name: "Compile and test"
run: ./runtests.sh --verbose --jou-flags "${{ matrix.opt-level }}"
- name: "Compile the compiler with itself"
run: mv jou jou_bootstrap && make
- name: "Compile and test again"
run: ./runtests.sh --verbose --jou-flags "${{ matrix.opt-level }}"
# Valgrinding all files is slow, but let's valgrind the hello world.
# This is enough to catch many bugs.
#
# We also have a separate, "full" valgrind run. See valgrind.yml.
- name: "Run hello world with valgrind"
run: ./runtests.sh --verbose --jou-flags "${{ matrix.opt-level }}" --valgrind hello
doctest:
needs: bootstrap
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: bootstrapped
- run: chmod +x jou_bootstrap
- run: sudo apt update
- run: sudo apt install -y llvm-{14,15,16}-dev clang-{14,15,16} make
- run: LLVM_CONFIG=llvm-config-14 ./doctest.sh
- run: mv jou_bootstrap x; make clean; mv x jou_bootstrap
- run: LLVM_CONFIG=llvm-config-15 ./doctest.sh
- run: mv jou_bootstrap x; make clean; mv x jou_bootstrap
- run: LLVM_CONFIG=llvm-config-16 ./doctest.sh