-
Notifications
You must be signed in to change notification settings - Fork 1
108 lines (103 loc) · 4.13 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: SporeModLoader
on: [push, pull_request]
jobs:
msvc-build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- name: Prepare Environment
run: |
$env:revision = git describe --tags --always
echo "GIT_REVISION=$env:revision" >> $env:GITHUB_ENV
- name: Build SporeModLoader (msvc)
run: |
msbuild "SporeModLoader" `
/p:Configuration=Release `
/p:Platform=Win32 `
/m
- name: Build SporeModManager (msvc)
run: |
msbuild "SporeModManager" `
/p:Configuration=Release `
/p:Platform=Win32 `
/m
- name: Package SporeModLoader (msvc)
run: |
New-Item -ItemType Directory -Force -Path bin\SporebinEP1
New-Item -ItemType Directory -Force -Path bin\SporeModLoader\CoreLibs\disk
New-Item -ItemType Directory -Force -Path bin\SporeModLoader\CoreLibs\march2017
New-Item -ItemType Directory -Force -Path bin\SporeModLoader\ModLibs
New-Item -ItemType Directory -Force -Path bin\SporeModLoader\SporeModManager
New-Item -ItemType File -Force -Path bin\SporeModLoader\ModLibs\.keep
Copy "3rdParty\Spore-ModAPI\dll\Release\SporeModAPI.disk.dll" "bin\SporeModLoader\CoreLibs\disk\SporeModAPI.dll"
Copy "3rdParty\Spore-ModAPI\dll\Release\SporeModAPI.march2017.dll" "bin\SporeModLoader\CoreLibs\march2017\SporeModAPI.dll"
Copy "3rdParty\Spore-ModAPI-legacy\SporeModAPI-disk.dll" "bin\SporeModLoader\CoreLibs\disk\SporeModAPI-disk.dll"
copy "3rdParty\Spore-ModAPI-legacy\SporeModAPI-steam_patched.dll" "bin\SporeModLoader\CoreLibs\march2017\SporeModAPI-steam_patched.dll"
Copy "SporeModLoader\Bin\Release\dinput8.dll" "bin\SporebinEP1\dinput8.dll"
Copy "SporeModManager\Bin\Release\SporeModManager.exe" "bin\SporeModLoader\SporeModManager\SporeModManager.exe"
- 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:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Prepare Environment
run: |
echo "GIT_REVISION=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Build SporeModManager (Linux)
run: |
make SporeModManager -j$(nproc)
- name: Upload SporeModLoader (Linux for msvc)
uses: actions/upload-artifact@v3
with:
name: SporeModLoader-${{ env.GIT_REVISION }}
path: bin/*
- name: Upload SporeModLoader (Linux for mingw)
uses: actions/upload-artifact@v3
with:
name: SporeModLoader-mingw-${{ 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/*