diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 212a313f..d415b203 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -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 diff --git a/.github/workflows/github_ci.yml b/.github/workflows/github_ci.yml index 55b9cc1a..5127f76d 100644 --- a/.github/workflows/github_ci.yml +++ b/.github/workflows/github_ci.yml @@ -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 diff --git a/.github/workflows/install_deps.sh b/.github/workflows/install_deps.sh index 5777f8a9..c2048157 100755 --- a/.github/workflows/install_deps.sh +++ b/.github/workflows/install_deps.sh @@ -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"/' /mingw64/include/SDL/SDL_gfxPrimitives.h else - exit 'unknown OS' + echo 'unknown OS' + exit 1 fi diff --git a/.github/workflows/test_simple.sh b/.github/workflows/test_simple.sh index 5627fa59..c10070f0 100755 --- a/.github/workflows/test_simple.sh +++ b/.github/workflows/test_simple.sh @@ -1,5 +1,14 @@ -set -e o pipefail -source .github/workflows/gh_ci_envvars.sh +set -x -e o pipefail -./hyperrogue --version \ No newline at end of file +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