-
Notifications
You must be signed in to change notification settings - Fork 4
177 lines (143 loc) · 4.68 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
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
name: CI
on: [push, pull_request]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
jobs:
MacOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@master
with:
submodules: recursive
- uses: actions/setup-python@master
with:
python-version: '3.10'
- uses: jurplel/install-qt-action@v3
id: qt
with:
cache: true
cache-key-prefix: qt
- name: Install dependencies
run: |
${{github.workspace}}/libs/libarchive/build/ci/github_actions/macos.sh prepare
export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix zstd)/lib/
- name: Autogen
working-directory: ${{github.workspace}}/libs/libarchive/
run: ./build/ci/build.sh -a autogen
env:
BS: cmake
- name: Configure
working-directory: ${{github.workspace}}/libs/libarchive/
run: ./build/ci/build.sh -a configure
env:
BS: cmake
- name: Install
working-directory: ${{github.workspace}}/libs/libarchive/
run: ./build/ci/build.sh -a install
env:
BS: cmake
- name: Copy archive.h
working-directory: ${{github.workspace}}
run : cp ./libs/libarchive/libarchive/archive.h ./libs/QArchive/include/archive.h
- name: Copy archive_entry.h
working-directory: ${{github.workspace}}
run : cp ./libs/libarchive/libarchive/archive_entry.h ./libs/QArchive/include/archive_entry.h
- name: QMake
run: |
qmake QMAKE_CXXFLAGS+="-fno-sized-deallocation"
- name: Make
run: |
export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix zstd)/lib/
export LIBRARY_PATH=$LIBRARY_PATH:$(brew --prefix nettle)/lib/
${{steps.qt.outputs.make}}
- name: Deploy Mac
if: matrix.os == 'macos-latest'
working-directory: ${{github.workspace}}/launcher/bin/
shell: bash
run: |
macdeployqt launcher.app
hdiutil create -volname "AO Launcher" -srcfolder "./launcher.app" -ov -format UDZO "launcher.dmg"
rm -r ./launcher.app/
- uses: actions/upload-artifact@v3
with:
name: launcher-macos-${{ github.sha }}
path: ${{ github.workspace }}/launcher/bin/
Ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get install -y autoconf automake build-essential cmake git libarchive-dev libssl-dev nettle-dev libmbedtls-dev libacl1-dev libbz2-dev liblzma-dev liblz4-dev libzstd-dev lzop pkg-config zlib1g-dev
- uses: jurplel/install-qt-action@v3
id: qt
with:
cache: true
cache-key-prefix: qt
- name: Autogen
working-directory: ${{github.workspace}}/libs/libarchive/
run: ./build/ci/build.sh -a autogen
env:
BS: cmake
- name: Configure
working-directory: ${{github.workspace}}/libs/libarchive/
run: ./build/ci/build.sh -a configure
env:
BS: cmake
CRYPTO: mbedtls
- name: Install
working-directory: ${{github.workspace}}/libs/libarchive/
run: ./build/ci/build.sh -a install
env:
BS: cmake
- name: QMake
run: |
qmake QMAKE_CXXFLAGS+="-fno-sized-deallocation"
- name: Make
run: |
${{steps.qt.outputs.make}}
- uses: actions/upload-artifact@v3
with:
name: launcher-ubuntu-${{ github.sha }}
path: ${{ github.workspace }}/launcher/bin/
Windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
with:
submodules: recursive
- uses: jurplel/install-qt-action@v3
id: qt
with:
cache: true
cache-key-prefix: qt
- name: Install dependencies
working-directory: ${{github.workspace}}/libs/libarchive/
run: ./build/ci/github_actions/ci.cmd deplibs
shell: cmd
env:
BE: msvc
- name: Configure
working-directory: ${{github.workspace}}/libs/libarchive/
run: ./build/ci/github_actions/ci.cmd configure
shell: cmd
env:
BE: msvc
- name: Install
working-directory: ${{github.workspace}}/libs/libarchive/
run: ./build/ci/github_actions/ci.cmd install
shell: cmd
env:
BE: msvc
- name: QMake
run: |
qmake QMAKE_CXXFLAGS+="-fno-sized-deallocation" INCLUDEPATH+="C:/Progra~2/libarchive/include/" LIBS+="-LC:/Progra~2/libarchive/lib/" LIBS+="-LC:/Progra~2/libarchive/bin/"
- name: Make
shell: bash
run: |
${{steps.qt.outputs.make}}
- uses: actions/upload-artifact@v3
with:
name: launcher-windows-msvc-${{ github.sha }}
path: ${{ github.workspace }}/launcher/bin/