diff --git a/.github/workflows/github_ci.yml b/.github/workflows/github_ci.yml index 5127f76da..dec854590 100644 --- a/.github/workflows/github_ci.yml +++ b/.github/workflows/github_ci.yml @@ -77,7 +77,7 @@ jobs: - uses: actions/checkout@v2 - name: Build run: | - docker run --rm -v $(pwd):/src trzeci/emscripten make -f Makefile.simple emscripten + podman run --rm -v $(pwd):/src emscripten/emsdk make -f Makefile.simple emscripten - name: Do a simple test run: | ls -lAF hyper.html hyper.js hyper.wasm diff --git a/.github/workflows/github_ci_logs.yml b/.github/workflows/github_ci_logs.yml new file mode 100644 index 000000000..918ffd85a --- /dev/null +++ b/.github/workflows/github_ci_logs.yml @@ -0,0 +1,32 @@ +name: Github CI log archiver +on: + workflow_run: + workflows: ["Github CI"] + types: + - completed + +jobs: + save_logs: + name: Save run logs + runs-on: ubuntu-latest + steps: + - name: Download log archive + run: | + curl -sI -u ${{ github.repository_owner }}:${{ github.token }} \ + https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/logs > response.txt + DOWNLOAD_LINK="https:"$(cat response.txt | grep -Fi Location: | cut -d: -f3) + DOWNLOAD_LINK=${DOWNLOAD_LINK%$'\r'} + curl -JO "$DOWNLOAD_LINK" + - name: Unpack log archive + id: archive_unpack + run: | + LOG_FILENAME=$(ls logs* | cut -d. -f1) + echo "::set-output name=log_filename::$LOG_FILENAME" + 7z x -ologs "$LOG_FILENAME".zip + - name: Upload log archive as an artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.archive_unpack.outputs.log_filename }} + path: logs/** + - name: Print the link to the base run + run: echo "::warning::This log was saved from https://github.com/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}" diff --git a/.github/workflows/install_deps.sh b/.github/workflows/install_deps.sh index c20481577..1e65c046f 100755 --- a/.github/workflows/install_deps.sh +++ b/.github/workflows/install_deps.sh @@ -26,7 +26,6 @@ fi if [[ "$GH_OS" == "ubuntu-latest" ]]; then sudo apt-get -y install $GH_DEPS_UBUNTU elif [[ "$GH_OS" == "macos-latest" ]]; then - brew update # macos-latest already has both gcc and clang brew install $GH_DEPS_MACOS # work around https://stackoverflow.com/questions/51034399/ for now diff --git a/.github/workflows/test_simple.sh b/.github/workflows/test_simple.sh index 5cbff0dd0..c64cdb690 100755 --- a/.github/workflows/test_simple.sh +++ b/.github/workflows/test_simple.sh @@ -5,8 +5,7 @@ if [[ "$GH_OS" == "windows-latest" && "$GH_BUILDSYS" == "mymake" ]]; then cat << ENDOFCMDS > .github/workflows/gdb_cmds.txt run --version - backtrace - exit 1 + quit 1 ENDOFCMDS gdb --batch -x .github/workflows/gdb_cmds.txt ./hyperrogue diff --git a/mymake.cpp b/mymake.cpp index e3a729881..5ddc1c21e 100644 --- a/mymake.cpp +++ b/mymake.cpp @@ -57,7 +57,6 @@ void set_mingw64() { linker = "g++ -o hyper"; opts = "-DWINDOWS -DCAP_GLEW=1 -DCAP_PNG=1"; libs = " savepng.o hyper.res -lopengl32 -lSDL -lSDL_gfx -lSDL_mixer -lSDL_ttf -lpthread -lz -lglew32 -lpng"; - setvbuf(stdout, NULL, _IONBF, 0); // MinGW is quirky with output buffering } vector modules; @@ -84,6 +83,7 @@ bool file_exists(string fname) { } int main(int argc, char **argv) { + setvbuf(stdout, NULL, _IONBF, 0); // this should help with responsiveness of the real-time CI logs #if defined(MAC) set_mac(); #elif defined(WINDOWS)