1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-15 18:00:04 +00:00

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

View File

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

View File

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

View File

@ -1,5 +1,14 @@
set -e o pipefail set -x -e o pipefail
source .github/workflows/gh_ci_envvars.sh
./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