Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CMake

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
BUILD_TYPE: Release
LLVM_DIR: /usr/lib/llvm-18/lib/cmake/llvm

jobs:
build:
runs-on: ubuntu-24.04

steps:
- name: Checkout awlang
uses: actions/checkout@v4

- name: Checkout awlib
uses: actions/checkout@v4
with:
repository: absurdworlds/awlib
path: awlib

# LLVM is installed from apt instead of built from source: building
# LLVM itself takes far too long to be worth it in CI.
- name: Install LLVM
run: |
sudo apt-get update
sudo apt-get install -y llvm-18-dev libzstd-dev

- name: Configure awlib
run: >
cmake -S awlib -B awlib/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DAW_MAKE_TESTS=OFF
-DAW_ENABLE_GRAPHICS=OFF
-DAW_ENABLE_LUA=OFF

- name: Build awlib
run: cmake --build awlib/build --config ${{env.BUILD_TYPE}}

- name: Install awlib
run: cmake --install awlib/build --prefix ${{github.workspace}}/awlib-install

- name: Configure awlang
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_PREFIX_PATH=${{github.workspace}}/awlib-install
-DLLVM_DIR=${{env.LLVM_DIR}}

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
working-directory: ${{github.workspace}}/build
# codegen/pointer.aw is a known-failing test (pointer-lvalue codegen bug,
# tracked separately) and is excluded so CI stays a signal for regressions.
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure -E "codegen/pointer.aw"
Loading