-
Notifications
You must be signed in to change notification settings - Fork 48
88 lines (83 loc) · 2.39 KB
/
build-optimized.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
name: Build optimized
on:
workflow_dispatch:
push:
branches:
- master
jobs:
linux:
runs-on: ubuntu-latest
container: ghcr.io/pyca/cryptography-manylinux_2_28:x86_64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- name: Dependencies
run: dnf install -y gtk3-devel zip
- name: Workaround for https://github.com/actions/runner/issues/2033
run: chown -R $(id -u):$(id -g) $PWD
- name: Build
run: ./make-linux.sh
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: linux-x64-gui.zip
path: ./flips
- name: Find Flips version
id: flips_version
run: echo version=$(git rev-list --count master) >> $GITHUB_OUTPUT
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- name: Build
run: bash ./make-windows.sh
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: windows-x64-gui.zip
path: ./flips.exe
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- name: Dependencies
run: brew install gtk+3 libomp llvm
- name: Build
run: CXX=/opt/homebrew/opt/llvm/bin/clang++ TARGET=gtk ./make-macos.sh
- name: Upload Artifacts
uses: actions/[email protected]
with:
name: macos-m1-gui.zip
path: ./flips
create-release:
runs-on: ubuntu-latest
needs: [linux, windows, macos]
steps:
- name: Download binaries
uses: actions/download-artifact@v4
with:
path: builds/
- name: Create zips
run: |
mv builds/linux-x64-gui.zip/flips flips
zip -9 ./flips-linux.zip .flips COPYING COPYING.gpl3
mv builds/windows-x64-gui.zip/flips.exe flips.exe
zip -9 ./flips-windows.zip flips.exe COPYING COPYING.gpl3
#mv builds/macos-m1-gui.zip/flips flips-mac
#zip -9 ./flips-macos.zip flips-mac COPYING COPYING.gpl3
- name: Upload GitHub Release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: flips-*.zip
file_glob: true
tag: v${{ steps.flips_version.outputs.version }}
body: "A release of commit ${{ github.sha }}."