-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (78 loc) · 3.16 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
name: Release
on:
push:
tags:
- 'v**'
permissions:
contents: write
env:
BUILD_TYPE: Release
jobs:
build_linux_x86-64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Packages
run: sudo apt install -y libboost-dev libeigen3-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev
- name: Build Libint
run: ./script/libint.sh
- name: Configure Acorn
run: cmake -B build -DBUILD_TOOLS=ON -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
- name: Build Acorn
run: |
export CPLUS_INCLUDE_PATH="$PWD/libint/install/include:$CPLUS_INCLUDE_PATH"
export LIBRARY_PATH="$PWD/libint/install/lib:$LIBRARY_PATH"
cmake --build build --parallel 2
- name: Copy Libint
run: cp $PWD/libint/install/lib/libint2.a bin/libint_linux_x86-64.a
- name: Rename Binaries
run: |
mv bin/acorn_centerxyz bin/acorn_centerxyz_linux_x86-64
mv bin/acorn_makemov bin/acorn_makemov_linux_x86-64
mv bin/acorn_view bin/acorn_view_linux_x86-64
mv bin/acorn bin/acorn_linux_x86-64
mv bin/libacorn.a bin/libacorn_linux_x86-64.a
mv bin/libfftw3.a bin/libfftw_linux_x86-64.a
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: linux
path: |
bin/acorn_centerxyz_linux_x86-64
bin/acorn_makemov_linux_x86-64
bin/acorn_view_linux_x86-64
bin/acorn_linux_x86-64
bin/libacorn_linux_x86-64.a
bin/libfftw_linux_x86-64.a
bin/libint_linux_x86-64.a
release:
runs-on: ubuntu-latest
needs: [build_linux_x86-64]
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Display Structure of Downloaded Files
run: ls -R
- name: Create Library Directory and Remove Redundant Scripts
run: mkdir library && rm example/generate.sh
- name: Generate the Header Only Library
run: ./script/headeronly.sh > library/acorn.h
- name: Copy x86-64 Linux Binaries to the Root Folder
run: |
cp linux/acorn_centerxyz_linux_x86-64 acorn_centerxyz
cp linux/acorn_makemov_linux_x86-64 acorn_makemov
cp linux/acorn_view_linux_x86-64 acorn_view
cp linux/acorn_linux_x86-64 acorn
cp linux/libacorn_linux_x86-64.a library/libacorn.a
cp linux/libfftw_linux_x86-64.a library/libfftw.a
cp linux/libint_linux_x86-64.a library/libint.a
- name: Create x86-64 Linux Packages
run: |
tar -czf acorn_linux_x86-64.tar.gz acorn acorn_centerxyz acorn_makemov acorn_view basis example interface library script/compress.py script/decompress.py script/plotmat.py script/plottraj.py script/plotwfn.py script/extract.awk LICENSE.md
- name: Release linux_x86-64 Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: acorn_linux_x86-64.tar.gz
tag: ${{github.ref}}