From bc36686786b747fb4434f0a0189e7b423efe5174 Mon Sep 17 00:00:00 2001 From: Aydyn Tairov Date: Sat, 29 Jul 2023 23:55:23 +0100 Subject: [PATCH] Add build step for win64 msys2/mingw --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97fd677..a954469 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,3 +94,31 @@ jobs: id: build_msvc run: | .\build_msvc.bat + + windows-latest-mingw: + runs-on: windows-latest + + defaults: + run: + shell: msys2 {0} + + strategy: + matrix: + include: + - { sys: mingw64, env: x86_64 } + + steps: + - name: Checkout + id: checkout + uses: actions/checkout@v3 + + - uses: msys2/setup-msys2@v2 + id: setup-msys2 + with: + msystem: ${{ matrix.sys }} + install: mingw-w64-${{matrix.env}}-gcc make + + - name: Build ${{ matrix.sys }} ${{ matrix.env }} + id: build_mingw + run: | + make win64 diff --git a/Makefile b/Makefile index 360cd2f..ced0d89 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ runomp: run.c .PHONY: win64 win64: - x86_64-w64-mingw32-gcc-win32 -Ofast -D_WIN32 -o run.exe -I. run.c win.c + x86_64-w64-mingw32-gcc -Ofast -D_WIN32 -o run.exe -I. run.c win.c # compiles with gnu99 standard flags for amazon linux, coreos, etc. compatibility .PHONY: rungnu