mirror of https://github.com/decompals/wibo.git
Build a wibo_debug binary as well (#51)
This commit is contained in:
parent
5a4af7d51b
commit
97a5af2055
|
@ -1,5 +1,15 @@
|
||||||
name: CI
|
name: CI
|
||||||
on: [push, pull_request]
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- '*.md'
|
||||||
|
- 'LICENSE'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
build_and_test:
|
||||||
name: Build and test
|
name: Build and test
|
||||||
|
@ -12,26 +22,40 @@ jobs:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y file unzip wget
|
sudo apt-get install -y file unzip wget
|
||||||
|
|
||||||
- name: Build
|
- name: Build debug
|
||||||
env:
|
run: docker build --build-arg build_type=Debug --target export --output build_debug .
|
||||||
DOCKER_BUILDKIT: 1
|
|
||||||
run: docker build --target export --output build .
|
- name: Build release
|
||||||
|
run: docker build --build-arg build_type=Release --target export --output build .
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
wget https://cdn.discordapp.com/attachments/727918646525165659/1129759991696457728/GC_WII_COMPILERS.zip
|
mv build_debug/wibo build/wibo_debug
|
||||||
unzip GC_WII_COMPILERS.zip
|
wget -q https://cdn.discordapp.com/attachments/727918646525165659/1129759991696457728/GC_WII_COMPILERS.zip
|
||||||
MWCIncludes=. build/wibo GC/2.7/mwcceppc.exe -c test/test.c -Itest
|
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
|
||||||
file test.o
|
file test.o
|
||||||
|
|
||||||
- name: Upload build
|
- name: Upload release
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: wibo
|
name: wibo
|
||||||
path: build/wibo
|
path: build/wibo
|
||||||
|
|
||||||
|
- name: Upload debug
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: wibo_debug
|
||||||
|
path: build/wibo_debug
|
||||||
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
files: build/wibo
|
files: |
|
||||||
|
build/wibo
|
||||||
|
build/wibo_debug
|
||||||
|
|
|
@ -7,10 +7,13 @@ RUN apk add --no-cache cmake ninja g++ linux-headers binutils
|
||||||
# Copy source files
|
# Copy source files
|
||||||
COPY . /wibo
|
COPY . /wibo
|
||||||
|
|
||||||
|
# Build type (Release, Debug, RelWithDebInfo, MinSizeRel)
|
||||||
|
ARG build_type=Release
|
||||||
|
|
||||||
# Build static binary
|
# Build static binary
|
||||||
RUN cmake -S /wibo -B /wibo/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-static" \
|
RUN cmake -S /wibo -B /wibo/build -G Ninja -DCMAKE_BUILD_TYPE="$build_type" -DCMAKE_CXX_FLAGS="-static" \
|
||||||
&& cmake --build /wibo/build \
|
&& cmake --build /wibo/build \
|
||||||
&& strip -g /wibo/build/wibo
|
&& ( [ "$build_type" != "Release" ] || strip -g /wibo/build/wibo )
|
||||||
|
|
||||||
# Export binary (usage: docker build --target export --output build .)
|
# Export binary (usage: docker build --target export --output build .)
|
||||||
FROM scratch AS export
|
FROM scratch AS export
|
||||||
|
|
Loading…
Reference in New Issue