Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: build and test

on:
push:
branches: [ mob ]
workflow_dispatch:

jobs:
test-x86_64-linux:
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/cmake-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CMake Build and Test

on:
push:
pull_request:
workflow_dispatch:

jobs:
build-and-test:
name: build+test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
env:
BUILD_CONFIG: Release
steps:
- uses: actions/checkout@v4

- name: Configure (Windows, clang-cl)
if: runner.os == 'Windows'
run: cmake -S . -B build -T ClangCL -DCMAKE_BUILD_TYPE=${{ env.BUILD_CONFIG }} -DMINICC_BUILD_SHARED_LIBTCC=ON -DMINICC_BUILD_WASM32_TCC=OFF -DMINICC_ENABLE_TESTING=ON

- name: Configure
if: runner.os != 'Windows'
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_CONFIG }} -DMINICC_BUILD_SHARED_LIBTCC=ON -DMINICC_BUILD_WASM32_TCC=OFF -DMINICC_ENABLE_TESTING=ON

- name: Build
run: cmake --build build --config ${{ env.BUILD_CONFIG }} --parallel

- name: Run tests
run: ctest --test-dir build -C ${{ env.BUILD_CONFIG }} --output-on-failure

wasm-backend:
name: wasm backend (ubuntu-latest)
runs-on: ubuntu-latest
timeout-minutes: 20
env:
BUILD_CONFIG: Release
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Configure (wasm enabled)
run: cmake -S . -B build-wasm -DCMAKE_BUILD_TYPE=${{ env.BUILD_CONFIG }} -DMINICC_BUILD_SHARED_LIBTCC=ON -DMINICC_BUILD_WASM32_TCC=ON -DMINICC_ENABLE_TESTING=ON

- name: Build (wasm enabled)
run: cmake --build build-wasm --config ${{ env.BUILD_CONFIG }} --parallel

- name: Verify wasm tests are discovered
run: |
ctest --test-dir build-wasm -N
ctest --test-dir build-wasm -N | grep -q "minicc.wasm."

- name: Run wasm backend tests
run: ctest --test-dir build-wasm -C ${{ env.BUILD_CONFIG }} -R "^minicc\\.wasm\\." --output-on-failure
Loading