Build testing with Actions (#266)
This commit is contained in:
parent
50efbede34
commit
93383a7535
2 changed files with 105 additions and 0 deletions
105
.github/workflows/main.yml
vendored
Normal file
105
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,105 @@
|
|||
name: taisei-build-tests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- v1.*
|
||||
tags:
|
||||
- v1.*
|
||||
paths:
|
||||
- "**.c"
|
||||
- "**.h"
|
||||
- "**.yml"
|
||||
- "**.yaml"
|
||||
- "**.build"
|
||||
pull_request:
|
||||
paths:
|
||||
- "**.c"
|
||||
- "**.h"
|
||||
- "**.yml"
|
||||
- "**.yaml"
|
||||
- "**.build"
|
||||
|
||||
jobs:
|
||||
linux-test-build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Checkout Submodules
|
||||
run: git submodule update --init --recursive
|
||||
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install Meson/Ninja (Pip)
|
||||
run: pip install meson ninja
|
||||
|
||||
- name: Install Build Tools (apt)
|
||||
run: sudo apt install build-essential libsdl2-dev libogg-dev libopusfile-dev libpng-dev libzip-dev libx11-dev libwayland-dev python3-docutils libwebp-dev libfreetype6-dev
|
||||
|
||||
- name: Configure - Step 1 (Meson)
|
||||
run: meson setup --prefix=$(pwd)/build-test --wrap-mode=nofallback build/ -Db_lto=false -Dstrip=false -Ddeprecation_warnings=no-error -Dwerror=true -Db_pch=false
|
||||
|
||||
- name: Build - Step 2 (Ninja)
|
||||
run: meson compile -C build/
|
||||
|
||||
- name: Install - Step 3 (Meson)
|
||||
run: meson install -C build/
|
||||
|
||||
- name: Run - Step 4 (Taisei)
|
||||
run: $(pwd)/build-test/bin/taisei -R $(pwd)/misc/tests/test-replay.tsr
|
||||
env:
|
||||
TAISEI_NOPRELOAD: 0
|
||||
TAISEI_PRELOAD_REQUIRED: 1
|
||||
|
||||
- name: Upload Log
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: taisei_linux_fail_log
|
||||
path: build/meson-logs/meson-log.txt
|
||||
|
||||
macos-test-build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
runs-on: macos-10.15
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Checkout Submodules
|
||||
run: git submodule update --init --recursive
|
||||
|
||||
- name: Set Up Build Environment
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install Build Tools (brew)
|
||||
run: brew install gcc meson pkg-config docutils pygments freetype2 libzip opusfile libvorbis webp sdl2 ninja
|
||||
|
||||
- name: Configure - Step 1 (Meson)
|
||||
run: meson setup --prefix=$(pwd)/build-test --wrap-mode=nofallback build/ -Db_lto=false -Dstrip=false -Ddeprecation_warnings=no-error -Dwerror=true -Db_pch=false
|
||||
|
||||
- name: Build - Step 2 (Ninja)
|
||||
run: meson compile -C build/
|
||||
|
||||
- name: Install - Step 3 (Meson)
|
||||
run: meson install -C build/
|
||||
|
||||
- name: Run - Step 4 (Taisei)
|
||||
run: $(pwd)/build-test/Taisei.app/Contents/MacOS/Taisei -R $(pwd)/misc/tests/test-replay.tsr
|
||||
env:
|
||||
TAISEI_NOPRELOAD: 0
|
||||
TAISEI_PRELOAD_REQUIRED: 1
|
||||
|
||||
- name: Upload Log
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: taisei_macos_fail_log
|
||||
path: build/meson-logs/meson-log.txt
|
BIN
misc/tests/test-replay.tsr
Normal file
BIN
misc/tests/test-replay.tsr
Normal file
Binary file not shown.
Loading…
Reference in a new issue