Skip to content

Commit

Permalink
ci: build mingw version of SporeModManager & SporeModLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Nov 16, 2023
1 parent b63d4ec commit 43558d9
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: SporeModLoader
on: [push, pull_request]

jobs:
build:
msvc-build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
Expand All @@ -16,19 +16,19 @@ jobs:
run: |
$env:revision = git describe --tags --always
echo "GIT_REVISION=$env:revision" >> $env:GITHUB_ENV
- name: Build SporeModLoader
- name: Build SporeModLoader (msvc)
run: |
msbuild "SporeModLoader" `
/p:Configuration=Release `
/p:Platform=Win32 `
/m
- name: Build SporeModManager
- name: Build SporeModManager (msvc)
run: |
msbuild "SporeModManager" `
/p:Configuration=Release `
/p:Platform=Win32 `
/m
- name: Package SporeModLoader
- name: Package SporeModLoader (msvc)
run: |
New-Item -ItemType Directory -Force -Path bin\SporebinEP1
New-Item -ItemType Directory -Force -Path bin\SporeModLoader\CoreLibs\disk
Expand All @@ -45,11 +45,22 @@ jobs:
Copy "SporeModLoader\Bin\Release\dinput8.dll" "bin\SporebinEP1\dinput8.dll"
Copy "SporeModManager\Bin\Release\SporeModManager.exe" "bin\SporeModLoader\SporeModManager\SporeModManager.exe"
- name: Upload SporeModLoader
- name: Upload SporeModLoader (msvc)
uses: actions/upload-artifact@v3
with:
name: SporeModLoader-${{ env.GIT_REVISION }}
path: bin/*
# the modapi dlls cannot be compiled using mingw
# due to needing to keep ABI compatability with
# existing mods compiled with msvc
- name: Upload SporeModLoader (modapi dlls for mingw)
uses: actions/upload-artifact@v3
with:
name: SporeModLoader-mingw-${{ env.GIT_REVISION }}
path: |
bin/*
!bin/SporebinEP1/dinput8.dll
!bin/SporeModLoader/SporeModManager/SporeModManager.exe
linux-build:
runs-on: ubuntu-20.04
steps:
Expand All @@ -61,9 +72,32 @@ jobs:
echo "GIT_REVISION=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Build SporeModManager (Linux)
run: |
make BINARY_DIR=bin/SporeModLoader/SporeModManager -j$(nproc)
make SporeModManager -j$(nproc)
- name: Upload SporeModLoader (Linux)
uses: actions/upload-artifact@v3
with:
name: SporeModLoader-${{ env.GIT_REVISION }}
path: bin/*
mingw-build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install Packages
run: |
sudo apt-get -y install gcc-mingw-w64-i686 g++-mingw-w64-i686
- name: Prepare Environment
run: |
echo "GIT_REVISION=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Build SporeModLoader (mingw)
run: |
make SporeModLoader -j$(nproc)
- name: Build SporeModManager (mingw)
run: |
make SporeModManager.exe -j$(nproc)
- name: Upload SporeModLoader (mingw)
uses: actions/upload-artifact@v3
with:
name: SporeModLoader-mingw-${{ env.GIT_REVISION }}
path: bin/*

0 comments on commit 43558d9

Please sign in to comment.