2022-06-30 19:23:00 +00:00
|
|
|
name: CI
|
2023-10-08 16:46:26 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
|
|
|
- 'LICENSE'
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
env:
|
|
|
|
DOCKER_BUILDKIT: 1
|
|
|
|
|
2022-06-30 19:23:00 +00:00
|
|
|
jobs:
|
|
|
|
build_and_test:
|
|
|
|
name: Build and test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-14 14:12:28 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-06-30 19:23:00 +00:00
|
|
|
|
2023-01-23 01:20:30 +00:00
|
|
|
- name: Install dependencies
|
2022-06-30 19:23:00 +00:00
|
|
|
run: |
|
2023-01-23 01:20:30 +00:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y file unzip wget
|
2022-06-30 19:23:00 +00:00
|
|
|
|
2023-10-08 16:46:26 +00:00
|
|
|
- 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 .
|
2022-06-30 19:23:00 +00:00
|
|
|
|
|
|
|
- name: Test
|
2023-10-08 16:46:26 +00:00
|
|
|
shell: bash
|
2022-06-30 19:23:00 +00:00
|
|
|
run: |
|
2023-10-08 16:46:26 +00:00
|
|
|
mv build_debug/wibo build/wibo_debug
|
|
|
|
wget -q https://cdn.discordapp.com/attachments/727918646525165659/1129759991696457728/GC_WII_COMPILERS.zip
|
|
|
|
unzip -q GC_WII_COMPILERS.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
|
2022-06-30 19:23:00 +00:00
|
|
|
file test.o
|
2022-07-01 17:18:03 +00:00
|
|
|
|
2023-10-08 16:46:26 +00:00
|
|
|
- name: Upload release
|
2023-09-14 14:12:28 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-07-01 17:18:03 +00:00
|
|
|
with:
|
|
|
|
name: wibo
|
2022-07-06 11:03:19 +00:00
|
|
|
path: build/wibo
|
2022-07-01 17:18:03 +00:00
|
|
|
|
2023-10-08 16:46:26 +00:00
|
|
|
- name: Upload debug
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: wibo_debug
|
|
|
|
path: build/wibo_debug
|
|
|
|
|
2022-07-03 14:15:45 +00:00
|
|
|
- name: Publish release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
2022-07-01 17:18:03 +00:00
|
|
|
with:
|
2023-10-08 16:46:26 +00:00
|
|
|
files: |
|
|
|
|
build/wibo
|
|
|
|
build/wibo_debug
|