summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorLoïc Guilloux <glx22@users.noreply.github.com>2021-06-10 23:54:52 +0200
committerGitHub <noreply@github.com>2021-06-10 23:54:52 +0200
commitacb6348ba62337d7580397d8f858e4a0bd1b0cab (patch)
tree82dc605f3b35b90e292dd76c18085f6985474bae /.github/workflows
parentd09210e1c6a446ec5a97de4e171aa101d047765a (diff)
downloadopenttd-acb6348ba62337d7580397d8f858e4a0bd1b0cab.tar.xz
Add: [Actions] msys2/MinGW CI (#8698)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci-build.yml73
1 files changed, 73 insertions, 0 deletions
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml
index 4dea7350c..8f1d1e195 100644
--- a/.github/workflows/ci-build.yml
+++ b/.github/workflows/ci-build.yml
@@ -316,6 +316,78 @@ jobs:
cd ${GITHUB_WORKSPACE}/build
ctest --timeout 120
+
+ msys2:
+ name: msys2
+
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - msystem: MINGW64
+ arch: x86_64
+ - msystem: MINGW32
+ arch: i686
+
+ runs-on: windows-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Setup MSYS2
+ uses: msys2/setup-msys2@v2
+ with:
+ msystem: ${{ matrix.msystem }}
+ update: true
+ install: >-
+ git
+ make
+ mingw-w64-${{ matrix.arch }}-cmake
+ mingw-w64-${{ matrix.arch }}-gcc
+ mingw-w64-${{ matrix.arch }}-lzo2
+ mingw-w64-${{ matrix.arch }}-libpng
+
+ - name: Install OpenGFX
+ shell: bash
+ run: |
+ mkdir -p "C:/Users/Public/Documents/OpenTTD/baseset"
+ cd "C:/Users/Public/Documents/OpenTTD/baseset"
+
+ echo "::group::Download OpenGFX"
+ curl -L https://cdn.openttd.org/opengfx-releases/0.6.0/opengfx-0.6.0-all.zip -o opengfx-all.zip
+ echo "::endgroup::"
+
+ echo "::group::Unpack OpenGFX"
+ unzip opengfx-all.zip
+ echo "::endgroup::"
+
+ rm -f opengfx-all.zip
+
+ - name: Install GCC problem matcher
+ uses: ammaraskar/gcc-problem-matcher@master
+
+ - name: Build
+ shell: msys2 {0}
+ run: |
+ mkdir build
+ cd build
+
+ echo "::group::CMake"
+ cmake .. -G"MSYS Makefiles"
+ echo "::endgroup::"
+
+ echo "::group::Build"
+ echo "Running on $(nproc) cores"
+ cmake --build . -j $(nproc)
+ echo "::endgroup::"
+
+ - name: Test
+ shell: msys2 {0}
+ run: |
+ cd build
+ ctest -j $(nproc) --timeout 120
+
check_annotations:
name: Check Annotations
needs:
@@ -323,6 +395,7 @@ jobs:
- linux
- macos
- windows
+ - msys2
if: always() && github.event_name == 'pull_request'