Add MinGW workflow builds for Linux and Windows

Signed-off-by: Pete Batard <pete@akeo.ie>
This commit is contained in:
Pete Batard 2024-05-09 12:39:46 +01:00
parent b74c52f8ba
commit 08f9ea33dc
No known key found for this signature in database
GPG Key ID: 38E0CF5E69EDD671
2 changed files with 73 additions and 0 deletions

31
.github/workflows/linux-mingw.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Linux, MinGW
on: [push, pull_request]
jobs:
MinGW-Build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64, ia32]
include:
- arch: x64
pkg: gcc-mingw-w64-x86-64
tuple: x86_64-w64-mingw32-
- arch: ia32
pkg: gcc-mingw-w64-i686
tuple: i686-w64-mingw32-
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Install gcc toolchain
run: sudo apt install ${{ matrix.pkg }}
- name: Build
run: make ARCH=${{ matrix.arch }} CROSS_COMPILE=${{ matrix.tuple }} lib

42
.github/workflows/windows-mingw.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Windows, MinGW
on: [push, pull_request]
jobs:
MinGW-Build:
runs-on: windows-latest
strategy:
matrix:
arch: [x64, ia32]
include:
- arch: x64
sys: mingw64
env: x86_64
- arch: ia32
sys: mingw32
env: i686
defaults:
run:
shell: msys2 {0}
steps:
- name: Install MinGW
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: >-
mingw-w64-${{ matrix.env }}-toolchain
base-devel
git
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Build
run: make lib