Merge pull request #128 from still-flow/ci_mymake

Improve CI configuration in various ways
This commit is contained in:
Zeno Rogue 2020-09-24 12:58:07 +02:00 committed by GitHub
commit b991b1ae85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 41 deletions

View File

@ -1,5 +1,4 @@
set -e o pipefail
source .github/workflows/gh_ci_envvars.sh
set -x -e o pipefail
GH_MYMAKE_ARGS="-fPIC"
@ -32,5 +31,6 @@ elif [[ "$GH_BUILDSYS" == "mymake" ]]; then
./mymake $GH_MYMAKE_ARGS
mv hyper hyperrogue
else
exit 'unknown build system'
echo 'unknown build system'
exit 1
fi

View File

@ -8,6 +8,7 @@ on:
jobs:
main_matrix:
name: Unix
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@ -18,36 +19,40 @@ jobs:
hyper_use_rviz: [rviz_1, rviz_0]
hyper_use_png: [png_1]
hyper_use_glew: [glew_1]
env:
GH_OS: ${{ matrix.os }}
GH_COMPILER: ${{ matrix.compiler }}
GH_BUILDSYS: ${{ matrix.build_system }}
GH_HYP_RVIZ: ${{ matrix.hyper_use_rviz }}
GH_HYP_PNG: ${{ matrix.hyper_use_png }}
GH_HYP_GLEW: ${{ matrix.hyper_use_glew }}
steps:
- uses: actions/checkout@v2
- name: envvars_setup
run: |
cat << ENDOFVARS > .github/workflows/gh_ci_envvars.sh
GH_OS=${{ matrix.os }}
GH_COMPILER=${{ matrix.compiler }}
GH_BUILDSYS=${{ matrix.build_system }}
GH_HYP_RVIZ=${{ matrix.hyper_use_rviz }}
GH_HYP_PNG=${{ matrix.hyper_use_png }}
GH_HYP_GLEW=${{ matrix.hyper_use_glew }}
ENDOFVARS
- name: install_deps
- name: Install build dependencies
run: .github/workflows/install_deps.sh
- name: build
- name: Build
run: .github/workflows/build.sh
- name: test_simple
- name: Do a simple test
run: .github/workflows/test_simple.sh
windows:
runs-on: ${{ matrix.os }}
name: Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: [windows-latest]
compiler: [gcc]
build_system: [makefile, autotools]
build_system: [makefile, autotools, mymake]
hyper_use_rviz: [rviz_1, rviz_0]
hyper_use_png: [png_1]
hyper_use_glew: [glew_1]
env:
GH_OS: windows-latest
GH_COMPILER: ${{ matrix.compiler }}
GH_BUILDSYS: ${{ matrix.build_system }}
GH_HYP_RVIZ: ${{ matrix.hyper_use_rviz }}
GH_HYP_PNG: ${{ matrix.hyper_use_png }}
GH_HYP_GLEW: ${{ matrix.hyper_use_glew }}
defaults:
run:
shell: msys2 {0}
@ -57,32 +62,22 @@ jobs:
update: true
install: 'pactoys'
- uses: actions/checkout@v2
- name: envvars_setup
run: |
cat << ENDOFVARS > .github/workflows/gh_ci_envvars.sh
GH_OS=${{ matrix.os }}
GH_COMPILER=${{ matrix.compiler }}
GH_BUILDSYS=${{ matrix.build_system }}
GH_HYP_RVIZ=${{ matrix.hyper_use_rviz }}
GH_HYP_PNG=${{ matrix.hyper_use_png }}
GH_HYP_GLEW=${{ matrix.hyper_use_glew }}
ENDOFVARS
- name: install_deps
- name: Install build dependencies
env:
MSYSTEM: MSYS
run: .github/workflows/install_deps.sh
- name: build
- name: Build
run: .github/workflows/build.sh
- name: test_simple
- name: Do a simple test
run: .github/workflows/test_simple.sh
emscripten:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build
- name: Build
run: |
docker run --rm -v $(pwd):/src trzeci/emscripten make -f Makefile.simple emscripten
- name: test_simple
- name: Do a simple test
run: |
ls -lAF hyper.html hyper.js hyper.wasm

View File

@ -1,10 +1,9 @@
set -e o pipefail
source .github/workflows/gh_ci_envvars.sh
set -x -e o pipefail
GH_DEPS_UBUNTU="$GH_COMPILER libsdl1.2-dev libsdl-ttf2.0-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev"
GH_DEPS_MACOS="sdl sdl_gfx sdl_mixer sdl_ttf"
GH_DEPS_MINGW64="$GH_COMPILER:x SDL:x SDL_ttf:x SDL_gfx:x SDL_mixer:x make"
GH_DEPS_MINGW64="$GH_COMPILER:x SDL:x SDL_ttf:x SDL_gfx:x SDL_mixer:x make gdb:x"
if [[ "$GH_HYP_GLEW" == "glew_1" ]]; then
GH_DEPS_UBUNTU+=" libglew-dev"
@ -36,5 +35,6 @@ elif [[ "$GH_OS" == "windows-latest" ]]; then
pacboy -Sy --noconfirm --needed $GH_DEPS_MINGW64
sed -i'.orig' 's/<SDL.h>/"SDL.h"/' /mingw64/include/SDL/SDL_gfxPrimitives.h
else
exit 'unknown OS'
echo 'unknown OS'
exit 1
fi

View File

@ -1,5 +1,14 @@
set -e o pipefail
source .github/workflows/gh_ci_envvars.sh
set -x -e o pipefail
./hyperrogue --version
if [[ "$GH_OS" == "windows-latest" && "$GH_BUILDSYS" == "mymake" ]]; then
cat << ENDOFCMDS > .github/workflows/gdb_cmds.txt
run --version
backtrace
ENDOFCMDS
gdb --batch -x .github/workflows/gdb_cmds.txt ./hyperrogue
else
./hyperrogue --version
fi