-
Notifications
You must be signed in to change notification settings - Fork 10
104 lines (84 loc) · 2.45 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
name: Build Binaries
on:
push:
pull_request:
release:
types: [ created ]
permissions:
contents: read
jobs:
windows:
name: "Build Windows"
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: run-vcpkg
uses: lukka/run-vcpkg@v11
with:
runVcpkgInstall: true
vcpkgGitCommitId: '1de2026f28ead93ff1773e6e680387643e914ea1'
- name: Integrate vcpkg
run: vcpkg integrate install
- name: Build Release
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:VcpkgEnableManifest=true /p:Configuration=Release
- name: Build Debug
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:VcpkgEnableManifest=true /p:Configuration=Debug
- uses: actions/upload-artifact@v3
with:
name: win64-release
path: |
x64/Release/SGDBoop.exe
x64/Release/libcurl.dll
x64/Release/zlib1.dll
- uses: actions/upload-artifact@v3
with:
name: win64-debug
path: x64/Debug/*
linux:
name: "Build Linux"
runs-on: ubuntu-latest
env:
OS: Linux
steps:
- uses: actions/checkout@v3
- name: Install libcurl
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libgtk-3-dev
- name: Build
run: sudo make
- uses: actions/upload-artifact@v3
with:
name: linux-build
path: linux-release/*
release:
if: github.event_name == 'release' && github.event.action == 'created'
name: "Upload Artifacts to Release"
runs-on: ubuntu-latest
permissions:
contents: write
needs: [windows,linux]
steps:
- uses: actions/[email protected]
with:
path: artifacts
- name: Archive Windows Release Build
run: 7z a sgdboop-win64.zip ./artifacts/win64-release/*
- name: Archive Linux Release Build
run: |
chmod +x artifacts/linux-build/install.sh artifacts/linux-build/SGDBoop
cd artifacts/linux-build/
tar -czvf ../../sgdboop-linux64.tar.gz *
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitName: true
omitBody: true
replacesArtifacts: true
tag: ${{github.event.release.tag_name}}
commit: ${{github.sha}}
artifacts: "sgdboop-linux64.tar.gz,sgdboop-win64.zip"