-
-
Notifications
You must be signed in to change notification settings - Fork 1
196 lines (193 loc) · 7.59 KB
/
ci-build.yaml
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# Note: Before creating a new major/minor release, update CURRENT_RELEASE_BRANCH
name: Chalet Release
on:
push:
tags:
- "v*"
release:
types: [created]
jobs:
Linux-Ubuntu:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
env:
CC: gcc-11
CXX: g++-11
UBUNTU_VERSION: focal
CI: 1
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
ref: ${{ secrets.CURRENT_RELEASE_BRANCH }}
- name: "arm setup"
run: |
sudo sed -i "s|deb mirror|deb [arch=amd64,i386] mirror|g" /etc/apt/sources.list
echo "deb [arch=armhf] http://ports.ubuntu.com/ $UBUNTU_VERSION main restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=armhf] http://ports.ubuntu.com/ $UBUNTU_VERSION-updates main restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=armhf] http://ports.ubuntu.com/ $UBUNTU_VERSION universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=armhf] http://ports.ubuntu.com/ $UBUNTU_VERSION-updates universe" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=armhf] http://ports.ubuntu.com/ $UBUNTU_VERSION multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=armhf] http://ports.ubuntu.com/ $UBUNTU_VERSION-updates multiverse" | sudo tee -a /etc/apt/sources.list
sudo dpkg --add-architecture armhf
- name: "Get Packages"
run: |
sudo apt update
sudo apt install gcc-11 g++-11 zip debhelper uuid-dev uuid-dev:armhf ninja-build gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
- name: "Fetch Dependencies"
run: bash ./fetch_externals.sh
- name: "Build: Debug"
run: bash ./build.sh Debug
- name: "Configure Chalet"
run: build/Debug/chalet-debug configure
- name: "Color Test"
run: build/Debug/chalet-debug termtest
- name: "Build: Release (arm)"
run: build/Debug/chalet-debug -c Release -t arm-linux-gnueabihf-gcc -b native bundle
- name: "Upload assets (arm)"
uses: softprops/action-gh-release@v1
with:
files: |
./dist/chalet-arm-linux-gnueabihf.zip
./dist/chalet-arm-linux-debian.zip
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: false
- name: "Build: Release (x86_64)"
run: build/Debug/chalet-debug -c Release -t x86_64-linux-gnu-gcc -b native bundle
- name: "Upload assets (x86_64)"
uses: softprops/action-gh-release@v1
with:
files: |
./dist/chalet-x86_64-linux-gnu.zip
./dist/chalet-amd64-linux-debian.zip
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: false
- name: "Run: Tests"
run: build/Debug/chalet-debug run tests
MacOS:
runs-on: macos-11
defaults:
run:
shell: bash
env:
MACOS_TEAM_ID: ${{ secrets.MACOS_TEAM_ID }}
MACOS_APPLE_ID: ${{ secrets.MACOS_APPLE_ID }}
MACOS_CHALET_APP_PWD: ${{ secrets.MACOS_CHALET_APP_PWD }}
MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
steps:
- name: "Prepare Environment for Signing"
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
- name: "Create Keychain profile"
run: xcrun notarytool store-credentials "ChaletProfile" --apple-id "$MACOS_APPLE_ID" --password "$MACOS_CHALET_APP_PWD" --team-id "$MACOS_TEAM_ID"
- name: "Checkout"
uses: actions/checkout@v3
with:
ref: ${{ secrets.CURRENT_RELEASE_BRANCH }}
- name: "Fetch Dependencies"
run: bash ./fetch_externals.sh
- name: "Build: Debug"
run: bash ./build.sh Debug
- name: "Configure Chalet"
run: build/Debug/chalet-debug configure --os-target-version 11.0 --signing-identity "$MACOS_SIGNING_IDENTITY"
- name: "Color Test"
run: build/Debug/chalet-debug termtest
- name: "Build: Release (x86_64)"
run: build/Debug/chalet-debug -c Release -a x86_64 -b native bundle
- name: "Notarize (x86_64)"
run: |
xcrun notarytool submit ./dist/chalet-x86_64-apple-darwin.zip --keychain-profile "ChaletProfile" --wait
- name: "Upload assets (x86_64)"
uses: softprops/action-gh-release@v1
with:
files: ./dist/chalet-x86_64-apple-darwin.zip
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: false
- name: "Build: Release (arm64)"
run: build/Debug/chalet-debug -c Release -a arm64 -b native bundle
- name: "Notarize (arm64)"
run: |
xcrun notarytool submit ./dist/chalet-arm64-apple-darwin.zip --keychain-profile "ChaletProfile" --wait
- name: "Upload assets (arm64)"
uses: softprops/action-gh-release@v1
with:
files: ./dist/chalet-arm64-apple-darwin.zip
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: false
- name: "Build: Release (universal)"
run: build/Debug/chalet-debug -c Release -a universal -b native bundle
- name: "Notarize (universal)"
run: |
xcrun notarytool submit ./dist/chalet-universal-apple-darwin.zip --keychain-profile "ChaletProfile" --wait
- name: "Upload assets (universal)"
uses: softprops/action-gh-release@v1
with:
files: ./dist/chalet-universal-apple-darwin.zip
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: false
- name: "Run: Tests"
run: build/Debug/chalet-debug run tests
Windows-MSVC:
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- name: "Get MSVC Environment"
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: "Checkout"
uses: actions/checkout@v3
with:
ref: ${{ secrets.CURRENT_RELEASE_BRANCH }}
- name: "Fetch Dependencies"
run: bash ./fetch_externals.sh
- name: "Show Version Info"
run: |
makensis -version
- name: "Build: Debug"
run: ./build-vs2022.bat Debug
- name: "Configure Chalet"
run: build/msvc_Debug/chalet-debug configure
- name: "Color Test"
run: build/msvc_Debug/chalet-debug termtest
- name: "Build: Release (x64)"
run: build/msvc_Debug/chalet-debug -c Release -t vs-stable -a x64 -b native bundle
- name: "Upload assets (x64)"
uses: softprops/action-gh-release@v1
with:
files: |
./dist/chalet-x86_64-pc-windows-msvc.zip
./dist/chalet-x86_64-pc-windows-msvc-installer.zip
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: false
- name: "Run: Tests"
run: build/msvc_Debug/chalet-debug run tests
- name: "Change MSVC Environment"
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_arm64
- name: "Build: Release (arm64)"
run: build/msvc_Debug/chalet-debug -c Release -t vs-stable -a arm64 -b native bundle
- name: "Upload assets (arm64)"
uses: softprops/action-gh-release@v1
with:
files: |
./dist/chalet-arm64-pc-windows-msvc.zip
./dist/chalet-arm64-pc-windows-msvc-installer.zip
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: false