Skip to content

Use compile time if statements (#712) #1770

Use compile time if statements (#712)

Use compile time if statements (#712) #1770

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
- 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 }}"
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: make clean
- run: LLVM_CONFIG=llvm-config-15 ./doctest.sh
- run: make clean
- run: LLVM_CONFIG=llvm-config-16 ./doctest.sh