-
Notifications
You must be signed in to change notification settings - Fork 47
129 lines (126 loc) · 4.38 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: NSFPlay 3 Builds
on:
push:
branches: [ "nsfplay3" ]
pull_request:
branches: [ "nsfplay3" ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-msvc:
name: Windows MSVC
runs-on: windows-latest
steps:
- name: Checkout Files
uses: actions/checkout@v4
- name: Setup MSVC
uses: microsoft/setup-msbuild@v2
- name: wxWidgets Cache Key
shell: pwsh
run: echo WXHASH=$(git ls-tree HEAD wx) >> $env:GITHUB_ENV
- name: Cache wxWidgets
id: cache-wx
uses: actions/cache@v4
with:
path: wxlib
key: wx-msvc-${{ env.WXHASH }}
- name: Build wxWidgets
if: steps.cache-wx.outputs.cache-hit != 'true'
shell: cmd
run: |
git submodule init
git submodule update --depth 1
cd wx
git submodule init
git submodule update --depth 1
cd ..
set WXB_GENERATOR="Visual Studio 17 2022"
set WXB_NODEBUG=1
set WXB_NOPAUSE=1
wxlib.bat
- name: Build 64-bit
run: msbuild nsfplay.sln -t:rebuild -property:Configuration=Release -property:Platform=x64
- name: Build 32-bit
run: msbuild nsfplay.sln -t:rebuild -property:Configuration=Release -property:Platform=x86
- name: Prepare Artifacts
shell: pwsh
run: |
mkdir artifact64
cp nsfplay.txt artifact64
cp output/x64/Release/nsfplay.exe artifact64
cp output/x64/Release/nsfplac.exe artifact64
cp output/Win32/Release/nsfplay.dll artifact64
mkdir artifact32
cp nsfplay.txt artifact32
cp output/Win32/Release/nsfplay.exe artifact32
cp output/Win32/Release/nsfplac.exe artifact32
cp output/Win32/Release/nsfplay.dll artifact32
echo "BUILD_TAG=$(git log -1 --format="%ad--%h" --date=format-local:"%Y-%m-%d-%H%M%S")" >> $env:GITHUB_ENV
- name: Upload 64-bit Artifact
uses: actions/upload-artifact@v4
with:
name: nsfplay3-win64--${{ env.BUILD_TAG }}
path: artifact64/
- name: Upload 32-bit Artifact
uses: actions/upload-artifact@v4
with:
name: nsfplay3-win32--${{ env.BUILD_TAG }}
path: artifact32/
build-msys2:
name: Windows MSYS2
runs-on: windows-latest
steps:
- name: Checkout Files
uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: git make cmake mingw-w64-ucrt-x86_64-gcc mingw-w64-i686-gcc
- name: wxWidgets Cache Key
shell: msys2 {0}
run: echo WXHASH=$(git ls-tree HEAD wx) >> $env:GITHUB_ENV
- name: Cache wxWidgets
id: cache-wx
uses: actions/cache@v4
with:
path: wxlib
key: wx-msys2-${{ env.WXHASH }}
- name: Build wxWidgets
if: steps.cache-wx.outputs.cache-hit != 'true'
shell: msys2 {0}
run: |
make wx
export PATH="/mingw32/bin:$PATH" WXCMAKE=make32; make wx
- name: Make 64-bit
shell: msys2 {0}
run: export OUTDIR=output/make64 INTDIR=intermediate/make64 ; make cmd gui
- name: Make 32-bit
shell: msys2 {0}
run: export PATH="/mingw32/bin:$PATH" OUTDIR=output/make32 INTDIR=intermediate/make32 WXL_LIBTYPE=gcc_lib ; make cmd gui winamp
- name: Prepare Artifacts
shell: pwsh
run: |
mkdir artifact64
cp nsfplay.txt artifact64
cp output/make64/nsfplay.exe artifact64
cp output/make64/nsfplac.exe artifact64
cp output/make32/nsfplay.dll artifact64
mkdir artifact32
cp nsfplay.txt artifact32
cp output/make32/nsfplay.exe artifact32
cp output/make32/nsfplac.exe artifact32
cp output/make32/nsfplay.dll artifact32
echo "BUILD_TAG=$(git log -1 --format="%ad--%h" --date=format-local:"%Y-%m-%d-%H%M%S")" >> $env:GITHUB_ENV
- name: Upload 64-bit Artifact
uses: actions/upload-artifact@v4
with:
name: nsfplay3-win64-ucrt--${{ env.BUILD_TAG }}
path: artifact64/
- name: Upload 32-bit Artifact
uses: actions/upload-artifact@v4
with:
name: nsfplay3-win32-mingw--${{ env.BUILD_TAG }}
path: artifact32/