From b4a5a936a08cdd8c4c9be25a6a52ca6675ca9cd0 Mon Sep 17 00:00:00 2001 From: Mary Date: Fri, 4 Dec 2020 01:28:26 +0100 Subject: [PATCH 1/2] CI: Add a GitHub Action to build on Windows This build in any commits and pull requests. --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..8fd6b4d35 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: build-win + +on: + push: + branches: [ master ] + pull_request: + +jobs: + build: + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + include: [ + { msystem: MINGW64, arch: x86_64 }, + # currently fail + #{ msystem: MINGW32, arch: i686 } + ] + steps: + + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Build + uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.msystem }} + install: mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-cmake mingw-w64-${{ matrix.arch }}-make mingw-w64-${{ matrix.arch }}-capstone mingw-w64-${{ matrix.arch }}-glfw mingw-w64-${{ matrix.arch }}-glm mingw-w64-${{ matrix.arch }}-file mingw-w64-${{ matrix.arch }}-llvm mingw-w64-${{ matrix.arch }}-nlohmann-json mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-polly mingw-w64-${{ matrix.arch }}-python + update: true + + - name: Build + shell: msys2 {0} + run: | + mkdir build + cd build + cmake -G "MinGW Makefiles" .. + mingw32-make -j From 7168c9ed592e0c9548c45cb9d23a13ebd8db09e1 Mon Sep 17 00:00:00 2001 From: Mary <1760003+Thog@users.noreply.github.com> Date: Fri, 4 Dec 2020 13:17:54 +0100 Subject: [PATCH 2/2] Limit make to 4 threads and move build.yml to build_win.yml --- .github/workflows/{build.yml => build_win.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{build.yml => build_win.yml} (94%) diff --git a/.github/workflows/build.yml b/.github/workflows/build_win.yml similarity index 94% rename from .github/workflows/build.yml rename to .github/workflows/build_win.yml index 8fd6b4d35..4a62d0676 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build_win.yml @@ -36,4 +36,4 @@ jobs: mkdir build cd build cmake -G "MinGW Makefiles" .. - mingw32-make -j + mingw32-make -j 4