-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (101 loc) · 3.51 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
name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
env:
BUILD_TYPE: Release
jobs:
build_linux_x86-64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Packages
run: sudo apt install -y libboost-all-dev
- name: Configure Primal
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build Primal
run: cmake --build build --parallel 2
- name: Rename Executable
run: mv bin/primal bin/primal_linux_x86-64
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
path: bin/primal_linux_x86-64
build_linux_x86-64_openmp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Packages
run: sudo apt install -y libboost-all-dev
- name: Configure Primal
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGOMP=ON
- name: Build Primal
run: cmake --build build --parallel 2
- name: Rename Executable
run: mv bin/primal bin/primal_linux_x86-64_openmp
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
path: bin/primal_linux_x86-64_openmp
build_windows_x86-64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Boost
uses: MarkusJx/[email protected]
id: boost
with:
boost_version: 1.73.0
- name: Configure Primal
run: cmake -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
env:
BOOST_ROOT: ${{steps.boost.outputs.BOOST_ROOT}}
- name: Build Primal
run: cmake --build build --parallel 2
- name: Rename Executable
run: mv bin/primal.exe bin/primal_windows_x86-64.exe
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
path: bin/primal_windows_x86-64.exe
release:
runs-on: ubuntu-latest
needs: [build_linux_x86-64, build_linux_x86-64_openmp, build_windows_x86-64]
steps:
- uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Copy x86-64 Binaries to the Root Folder
run: |
cp artifact/primal_linux_x86-64 primal && cp artifact/primal_windows_x86-64.exe primal.exe
- name: Create x86-64 Packages
run: |
zip -r primal_windows_x86-64.zip primal.exe LICENSE.md
tar -czf primal_linux_x86-64.tar.gz primal LICENSE.md
- name: Copy x86-64_openmp Binaries to the Root Folder
run: |
cp artifact/primal_linux_x86-64_openmp primal
- name: Create x86-64_openmp Packages
run: |
tar -czf primal_linux_x86-64_openmp.tar.gz primal LICENSE.md
- name: Release linux_x86-64 Version of Primal
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: primal_linux_x86-64.tar.gz
tag: ${{github.ref}}
- name: Release windows_x86-64 Version of Primal
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: primal_windows_x86-64.zip
tag: ${{github.ref}}
- name: Release linux_x86-64_openmp Version of Primal
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: primal_linux_x86-64_openmp.tar.gz
tag: ${{github.ref}}