From 6327e766d95c9a5ca027af4e996e3bdafb8a3fb0 Mon Sep 17 00:00:00 2001 From: still-flow <46608177+still-flow@users.noreply.github.com> Date: Tue, 22 Sep 2020 19:57:36 +0300 Subject: [PATCH 1/3] set cpp std to c++17 for rogueviz CI builds related to #117 --- .github/workflows/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 7184753f..399ba951 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -14,8 +14,8 @@ export HYPERROGUE_USE_PNG=${HYPERROGUE_USE_PNG: -1} HYPERROGUE_USE_ROGUEVIZ=$GH_HYP_RVIZ export HYPERROGUE_USE_ROGUEVIZ=${HYPERROGUE_USE_ROGUEVIZ: -1} if [[ "$GH_HYP_RVIZ" == "rviz_1" ]]; then - GH_MYMAKE_ARGS+=" -rv" - GH_AUTOTOOLS_CXXFLAGS+=" -DCAP_ROGUEVIZ=1" + GH_MYMAKE_ARGS+=" -std=c++17 -rv" + GH_AUTOTOOLS_CXXFLAGS+=" -std=c++17 -DCAP_ROGUEVIZ=1" fi export CC=$GH_COMPILER From 4970b6af25ba3b84804a59b1683598879e725330 Mon Sep 17 00:00:00 2001 From: still-flow <46608177+still-flow@users.noreply.github.com> Date: Tue, 22 Sep 2020 22:16:49 +0300 Subject: [PATCH 2/3] add -fPIC opt to CXXFLAGS across the board --- .github/workflows/build.sh | 2 +- Makefile.simple | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 399ba951..212a313f 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -2,7 +2,7 @@ set -e o pipefail source .github/workflows/gh_ci_envvars.sh -GH_MYMAKE_ARGS="" +GH_MYMAKE_ARGS="-fPIC" GH_AUTOTOOLS_CXXFLAGS="-W -Wall -Wextra -Wno-unused-parameter -Wno-maybe-uninitialized" HYPERROGUE_USE_GLEW=$GH_HYP_GLEW diff --git a/Makefile.simple b/Makefile.simple index 02e951e3..dc5b843c 100644 --- a/Makefile.simple +++ b/Makefile.simple @@ -81,14 +81,14 @@ endif ifeq (${TOOLCHAIN},clang) CXXFLAGS_STD = -std=c++11 - CXXFLAGS_EARLY += -march=native + CXXFLAGS_EARLY += -march=native -fPIC CXXFLAGS_EARLY += -W -Wall -Wextra -Werror -pedantic CXXFLAGS_EARLY += -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized -Wno-unknown-warning-option endif ifeq (${TOOLCHAIN},gcc) CXXFLAGS_STD = -std=c++11 - CXXFLAGS_EARLY += -march=native + CXXFLAGS_EARLY += -march=native -fPIC CXXFLAGS_EARLY += -W -Wall -Wextra -Werror -pedantic CXXFLAGS_EARLY += -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized endif From efc2766849e8dbd82880554ecc0a2a5fdb1ddf46 Mon Sep 17 00:00:00 2001 From: still-flow <46608177+still-flow@users.noreply.github.com> Date: Tue, 22 Sep 2020 23:17:16 +0300 Subject: [PATCH 3/3] move to setup-msys2 action much less clunky config as a bonus --- .github/workflows/github_ci.yml | 16 ++++++++++++---- .github/workflows/install_deps.sh | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github_ci.yml b/.github/workflows/github_ci.yml index 5affa528..55b9cc1a 100644 --- a/.github/workflows/github_ci.yml +++ b/.github/workflows/github_ci.yml @@ -48,10 +48,16 @@ jobs: hyper_use_rviz: [rviz_1, rviz_0] hyper_use_png: [png_1] hyper_use_glew: [glew_1] + defaults: + run: + shell: msys2 {0} steps: + - uses: msys2/setup-msys2@v2 + with: + update: true + install: 'pactoys' - uses: actions/checkout@v2 - name: envvars_setup - shell: cmd.exe /D /E:ON /V:OFF /C "C:\msys64\msys2_shell.cmd -defterm -msys2 -no-start -full-path -here {0}" run: | cat << ENDOFVARS > .github/workflows/gh_ci_envvars.sh GH_OS=${{ matrix.os }} @@ -62,11 +68,13 @@ jobs: GH_HYP_GLEW=${{ matrix.hyper_use_glew }} ENDOFVARS - name: install_deps - run: cmd.exe /D /E:ON /V:OFF /C "C:\msys64\msys2_shell.cmd -defterm -msys2 -no-start -full-path -here .github/workflows/install_deps.sh" + env: + MSYSTEM: MSYS + run: .github/workflows/install_deps.sh - name: build - run: cmd.exe /D /E:ON /V:OFF /C "C:\msys64\msys2_shell.cmd -defterm -mingw64 -no-start -full-path -here .github/workflows/build.sh" + run: .github/workflows/build.sh - name: test_simple - run: cmd.exe /D /E:ON /V:OFF /C "C:\msys64\msys2_shell.cmd -defterm -mingw64 -no-start -full-path -here .github/workflows/test_simple.sh" + run: .github/workflows/test_simple.sh emscripten: runs-on: ubuntu-latest diff --git a/.github/workflows/install_deps.sh b/.github/workflows/install_deps.sh index 35ca0e7d..5777f8a9 100755 --- a/.github/workflows/install_deps.sh +++ b/.github/workflows/install_deps.sh @@ -4,7 +4,7 @@ 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_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" +GH_DEPS_MINGW64="$GH_COMPILER:x SDL:x SDL_ttf:x SDL_gfx:x SDL_mixer:x make" if [[ "$GH_HYP_GLEW" == "glew_1" ]]; then GH_DEPS_UBUNTU+=" libglew-dev"