mirror of
https://github.com/encounter/wibo.git
synced 2026-03-30 11:42:31 -07:00
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '*.md'
|
|
- 'LICENSE'
|
|
pull_request:
|
|
|
|
env:
|
|
DOCKER_BUILDKIT: 1
|
|
|
|
jobs:
|
|
build_and_test:
|
|
name: Build and test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
file \
|
|
unzip \
|
|
wget \
|
|
cmake \
|
|
ninja-build \
|
|
g++-multilib \
|
|
gcc-mingw-w64-i686 \
|
|
binutils-mingw-w64-i686
|
|
|
|
- name: Build debug
|
|
run: docker build --build-arg build_type=Debug --target export --output build_debug .
|
|
|
|
- name: Build release
|
|
run: docker build --build-arg build_type=Release --target export --output build .
|
|
|
|
- name: Test
|
|
shell: bash
|
|
run: |
|
|
mv build_debug/wibo build/wibo_debug
|
|
wget -q https://files.decomp.dev/compilers_latest.zip
|
|
unzip -q compilers_latest.zip
|
|
set -x
|
|
build/wibo_debug Wii/1.7/mwcceppc.exe -nodefaults -c test/test.c -Itest -o test_debug.o
|
|
file test_debug.o
|
|
build/wibo Wii/1.7/mwcceppc.exe -nodefaults -c test/test.c -Itest -o test.o
|
|
file test.o
|
|
|
|
- name: Fixture tests
|
|
run: |
|
|
cmake -S . -B build_ctest -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DWIBO_ENABLE_FIXTURE_TESTS=ON
|
|
cmake --build build_ctest
|
|
ctest --test-dir build_ctest --output-on-failure
|
|
|
|
- name: Upload release
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: wibo
|
|
path: build/wibo
|
|
|
|
- name: Upload debug
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: wibo_debug
|
|
path: build/wibo_debug
|
|
|
|
- name: Publish release
|
|
uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
build/wibo
|
|
build/wibo_debug
|