Browse Source

Windows test builds, cleanup of CI (#286)

pull/285/merge
Alice D 2 months ago
committed by GitHub
parent
commit
03cbc55137
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 238 additions and 40 deletions
  1. +120
    -40
      .github/workflows/main.yml
  2. +24
    -0
      misc/ci/linux-x86_64-build-test-ci.ini
  3. +26
    -0
      misc/ci/macos-x86_64-build-test-ci.ini
  4. +0
    -0
      misc/ci/tests/test-replay.tsr
  5. +68
    -0
      misc/ci/windows-llvm_mingw-x86_64-build-test-ci.ini

+ 120
- 40
.github/workflows/main.yml View File

@ -27,42 +27,60 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Checkout Submodules
run: git submodule update --init --recursive
with:
submodules: 'recursive'
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Build Tools (pip)
run: pip install meson ninja zstandard
- name: Install Build Tools (apt)
run: sudo apt update && 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 libzstd-dev
- name: Configure - Step 1 (Meson)
run: meson setup --prefix=$(pwd)/build-test --wrap-mode=nofallback --force-fallback-for=cglm build/ -Db_lto=false -Dstrip=false -Ddeprecation_warnings=no-error -Dwerror=true -Dbasis_universal:werror=false -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
run: >
sudo apt update
sudo apt install -y -qq
build-essential
libsdl2-dev
libogg-dev
libopusfile-dev
libpng-dev
libzip-dev
libx11-dev
libwayland-dev
python3-docutils
libwebp-dev
libfreetype6-dev
libzstd-dev
pip install
meson==0.55.3
ninja
zstandard
- name: Configure (Meson)
run: >
meson setup build/
--prefix=$(pwd)/build-test
--native-file misc/ci/linux-x86_64-build-test-ci.ini
- name: Build & Install
run: |
meson compile -C build/ --verbose
meson install -C build/
- name: Run Test
run: $(pwd)/build-test/bin/taisei -R $(pwd)/misc/ci/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
if-no-files-found: warn
macos-test-build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
@ -70,39 +88,101 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Checkout Submodules
run: git submodule update --init --recursive
with:
submodules: '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: Install Build Tools
run: >
brew install
gcc
pkg-config
docutils
pygments
freetype2
libzip
opusfile
libvorbis
webp
sdl2
ninja
pip install
meson==0.55.3
ninja
zstandard
- name: Configure (Meson)
run: >
meson setup build/
--native-file misc/ci/macos-x86_64-build-test-ci.ini
--prefix=$(pwd)/build-test
- name: Build & Install
run: |
meson compile -C build/ --verbose
meson install -C build/
- name: Run Test
run: $(pwd)/build-test/Taisei.app/Contents/MacOS/Taisei -R $(pwd)/misc/ci/tests/test-replay.tsr
env:
TAISEI_NOPRELOAD: 0
TAISEI_PRELOAD_REQUIRED: 1
- name: Upload Log
uses: actions/upload-artifact@v2
with:
name: taisei_macos_fail_log
path: build/meson-logs/meson-log.txt
if-no-files-found: warn
windows-test-build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-20.04
container: mstorsjo/llvm-mingw:20210423 # cross-compiler with mingw
steps:
- name: Install tools (Apt)
run: >
apt update
- name: Install Build Tools (pip)
run: pip install zstandard
apt install -y -qq software-properties-common
- name: Configure - Step 1 (Meson)
run: meson setup --prefix=$(pwd)/build-test --wrap-mode=nofallback --force-fallback-for=cglm build/ -Db_lto=false -Dstrip=false -Ddeprecation_warnings=no-error -Dwerror=true -Dbasis_universal:werror=false -Db_pch=false
add-apt-repository ppa:git-core/ppa -y
- name: Build - Step 2 (Ninja)
run: meson compile -C build/
apt install -y -qq
python3-docutils
python3-pip
git
nsis
- name: Install - Step 3 (Meson)
run: meson install -C build/
pip3 install
meson==0.55.3
ninja
zstandard
- 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: Checkout Code (Git)
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Configure Taisei (Meson)
run: >
meson setup build/
--prefix=$(pwd)/build-test
--cross-file misc/ci/windows-llvm_mingw-x86_64-build-test-ci.ini
- name: Build & Install
run: |
meson compile -C build/ --verbose
meson install -C build/
- name: Upload Log
uses: actions/upload-artifact@v2
if: failure()
with:
name: taisei_macos_fail_log
name: taisei_windows_fail_log
path: build/meson-logs/meson-log.txt
if-no-files-found: warn

+ 24
- 0
misc/ci/linux-x86_64-build-test-ci.ini View File

@ -0,0 +1,24 @@
[constants]
march = 'core2'
mtune = 'skylake'
cflags = ['-march='+march, '-mtune='+mtune]
ldflags = []
[project options]
deprecation_warnings = 'no-error'
[built-in options]
c_args = cflags
c_link_args = ldflags
cpp_args = cflags
cpp_link_args = ldflags
wrap_mode = 'nofallback'
force_fallback_for = 'cglm'
werror = false
b_pch = false
b_lto = false
strip = false
[basis_universal: built-in options]
werror = false

+ 26
- 0
misc/ci/macos-x86_64-build-test-ci.ini View File

@ -0,0 +1,26 @@
[constants]
march = 'core2'
mtune = 'skylake'
macos_min = '10.9'
cflags = ['-mmacosx-version-min='+macos_min, '-march='+march, '-mtune='+mtune]
# NOTE: might need to pass -sdk_version to the linker as well, not sure how that works...
ldflags = ['-mmacosx-version-min='+macos_min]
[project options]
deprecation_warnings = 'no-error'
[built-in options]
c_args = cflags
c_link_args = ldflags
cpp_args = cflags
cpp_link_args = ldflags
wrap_mode = 'nofallback'
force_fallback_for = 'cglm'
werror = true
b_pch = false
b_lto = false
strip = false
[basis_universal: built-in options]
werror = false

misc/tests/test-replay.tsr → misc/ci/tests/test-replay.tsr View File


+ 68
- 0
misc/ci/windows-llvm_mingw-x86_64-build-test-ci.ini View File

@ -0,0 +1,68 @@
[constants]
toolchain = '/opt/llvm-mingw'
arch = 'x86_64-w64-mingw32'
cpufamily = 'x86_64'
march = 'x86-64-v2'
mtune = 'znver2'
bin = toolchain/'bin'
exeprefix = bin/arch+'-'
cc = exeprefix+'clang'
cxx = exeprefix+'clang++'
cflags = ['-march='+march, '-mtune='+mtune]
ldflags = ['-static']
[properties]
needs_exe_wrapper = true
sys_root = toolchain/arch
pkg_config_libdir = toolchain/arch/'lib'
[binaries]
c = cc
cpp = cxx
c_ld = 'lld'
cpp_ld = 'lld'
strip = exeprefix+'strip'
ar = exeprefix+'ar'
ranlib = exeprefix+'ranlib'
nm = exeprefix+'nm'
size = exeprefix+'size'
dlltool = exeprefix+'dlltool'
objcopy = exeprefix+'objcopy'
objdump = exeprefix+'objdump'
widl = exeprefix+'widl'
windres = exeprefix+'windres'
ld = exeprefix+'ld'
[project options]
deprecation_warnings = 'no-error'
[built-in options]
c_args = cflags
c_link_args = ldflags
cpp_args = cflags
cpp_link_args = ldflags
wrap_mode = 'forcefallback'
force_fallback_for = 'cglm'
werror = false
strip = false
b_pch = false
b_lto = false
[cglm:built-in options]
werror = false
[libzip:built-in options]
werror = false
[cmake]
CMAKE_C_COMPILER = cc
CMAKE_CXX_COMPILER = cxx
CMAKE_C_FLAGS = cflags
CMAKE_CXX_FLAGS = cflags
[host_machine]
system = 'windows'
cpu_family = cpufamily
cpu = march
endian = 'little'

Loading…
Cancel
Save