-
Notifications
You must be signed in to change notification settings - Fork 0
181 lines (133 loc) · 5.65 KB
/
release.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
178
179
180
181
name: Release
on:
push:
tags:
- 'v**'
permissions:
contents: write
env:
BUILD_TYPE: Release
jobs:
build-libs_linux-shared_x86-64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Necessary Packages
run: sudo apt install libwayland-dev libxkbcommon-dev xorg-dev
- name: Install Python Packages
run: pip install typing-extensions
- name: Download and Compile Libraries
run: ./script/general/library.sh
- name: Remove Redundant Files
run: rm -rf external/lib/cmake external/lib/pkgconfig external/lib/*.la external/include/*.f03
- name: Package the Libraries
run: cd external && tar -czf acorn-libs_linux-shared_x86-64.tar.gz * && cd -
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: libs_linux-shared
path: external/acorn-libs_linux-shared_x86-64.tar.gz
build-libs_linux-static_x86-64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Necessary Packages
run: sudo apt install libwayland-dev libxkbcommon-dev xorg-dev
- name: Install Python Packages
run: pip install typing-extensions
- name: Download and Compile Libraries
run: ./script/general/library.sh
- name: Remove Redundant Files
run: rm -rf external/lib/cmake external/lib/pkgconfig external/lib/*.la external/include/*.f03
- name: Package the Libraries
run: cd external && tar -czf acorn-libs_linux-static_x86-64.tar.gz * && cd -
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: libs_linux-static
path: external/acorn-libs_linux-static_x86-64.tar.gz
build-acorn_linux-shared_x86-64:
runs-on: ubuntu-22.04
needs: [build-libs_linux-shared_x86-64]
steps:
- uses: actions/checkout@v4
- name: Install Necessary Packages
run: sudo apt install libwayland-dev libxkbcommon-dev xorg-dev
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Extract the Libraries
run: mkdir external && mv libs_linux-shared/acorn-libs_linux-shared_x86-64.tar.gz external/ && cd external && tar -xzf acorn-libs_linux-shared_x86-64.tar.gz && cd -
- name: Configure Acorn
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSTATIC=ON
- name: Build Acorn
run: cmake --build build --parallel 2 --verbose
- name: Rename Binaries
run: mv bin/acorn bin/acorn_linux-shared_x86-64
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: linux-shared
path: bin/acorn_linux-shared_x86-64
build-acorn_linux-static_x86-64:
runs-on: ubuntu-22.04
needs: [build-libs_linux-static_x86-64]
steps:
- uses: actions/checkout@v4
- name: Install Necessary Packages
run: sudo apt install libwayland-dev libxkbcommon-dev xorg-dev
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Extract the Libraries
run: mkdir external && mv libs_linux-static/acorn-libs_linux-static_x86-64.tar.gz external/ && cd external && tar -xzf acorn-libs_linux-static_x86-64.tar.gz && cd -
- name: Configure Acorn
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSTATIC=ON
- name: Build Acorn
run: cmake --build build --parallel 2 --verbose
- name: Rename Binaries
run: mv bin/acorn bin/acorn_linux-static_x86-64
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: linux-static
path: bin/acorn_linux-static_x86-64
release:
runs-on: ubuntu-latest
needs: [build-acorn_linux-shared_x86-64, build-acorn_linux-static_x86-64]
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Remove Redundant Scripts
run: rm basis/update.sh example/molecule/generate.sh
- name: Create x86-64 Linux Shared Packages
run: cp linux-shared/acorn_linux-shared_x86-64 acorn && tar -czf acorn_linux-shared_x86-64.tar.gz acorn basis example script/plot LICENSE.md
- name: Create x86-64 Linux Static Packages
run: cp linux-static/acorn_linux-static_x86-64 acorn && tar -czf acorn_linux-static_x86-64.tar.gz acorn basis example script/plot LICENSE.md
- name: Copy x86-64 Linux Shared and Static Libraries to the Root Folder
run: |
mv libs_linux-shared/acorn-libs_linux-shared_x86-64.tar.gz .
mv libs_linux-static/acorn-libs_linux-static_x86-64.tar.gz .
- name: Release linux-shared_x86-64 Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: acorn_linux-shared_x86-64.tar.gz
tag: ${{github.ref}}
- name: Release linux-static_x86-64 Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: acorn_linux-static_x86-64.tar.gz
tag: ${{github.ref}}
- name: Release linux-shared_x86-64 Version of Acorn Libraries
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: acorn-libs_linux-shared_x86-64.tar.gz
tag: ${{github.ref}}
- name: Release linux-static_x86-64 Version of Acorn Libraries
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: acorn-libs_linux-static_x86-64.tar.gz
tag: ${{github.ref}}