-
Notifications
You must be signed in to change notification settings - Fork 2
134 lines (111 loc) · 3.46 KB
/
build-manylinux.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
name: build manylinux
on:
pull_request:
branches:
- main
workflow_dispatch:
workflow_call:
env:
do_dynamic: true
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y g++-12 libboost-all-dev libeigen3-dev libtiff-dev libjpeg-dev libjbig-dev liblzma-dev libzstd-dev libwebp-dev libdeflate-dev libleptonica-dev liblerc-dev
- name: Check Packages Versions
run: |
dpkg-query -W -f='${binary:Package} ${Version}\n' g++-12 libboost-all-dev libeigen3-dev libtiff-dev libjpeg-dev libjbig-dev liblzma-dev libzstd-dev libwebp-dev libdeflate-dev libleptonica-dev liblerc-dev > new_pkgs_ubuntu.txt
cat new_pkgs_ubuntu.txt
- name: Get Environment
if: ${{ env.do_dynamic == 'true' }}
run: |
DISTRIBUTION=$( lsb_release --short --id 2>/dev/null )
CODENAME=$( lsb_release --short --codename 2>/dev/null )
MACHINE=$( uname --machine 2>/dev/null )
echo "SUFFIX=".${DISTRIBUTION}.${CODENAME}.${MACHINE}"" >> $GITHUB_ENV
- name: BuildSuffix
if: ${{ env.do_dynamic == 'true' }}
run: |
cd Cell2Fire
make clean
make
ldd Cell2Fire > ldd${{ env.SUFFIX }}.txt
mv Cell2Fire Cell2Fire${{ env.SUFFIX }}
- name: Upload
if: ${{ env.do_dynamic == 'true' }}
uses: actions/upload-artifact@v4
with:
name: binaries${{ env.SUFFIX }}
path: |
Cell2Fire/ldd${{ env.SUFFIX }}.txt
Cell2Fire/Cell2Fire${{ env.SUFFIX }}
if-no-files-found: error
- name: BuildStatic
run: |
cd Cell2Fire
make clean
make -f makefile.static > ldd_manylinux.txt 2>&1 || true
ldd Cell2Fire > ldd_manylinux.txt 2>&1 || true
- name: Upload
uses: actions/upload-artifact@v4
with:
name: binaries-manylinux-x86_64
path: |
Cell2Fire/ldd_manylinux.txt
Cell2Fire/Cell2Fire
if-no-files-found: error
test:
needs: build
runs-on: ubuntu-latest
container: ubuntu:jammy
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Dependencies
run: |
apt update
apt install -y unzip lsb-release
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
pattern: binaries*
path: Cell2Fire
merge-multiple: true
- name: chmod
run: |
chmod +x Cell2Fire/Cell2Fire*
- name: TestManyLinux
run: |
cd test
bash test.sh
- name: Get Environment
if: ${{ env.do_dynamic == 'true' }}
id: get_env
run: |
DISTRIBUTION=$( lsb_release --short --id 2>/dev/null )
CODENAME=$( lsb_release --short --codename 2>/dev/null )
MACHINE=$( uname --machine 2>/dev/null )
echo "SUFFIX=".${DISTRIBUTION}.${CODENAME}.${MACHINE}"" >> $GITHUB_ENV
- name: TestSuffixFail
if: ${{ env.do_dynamic == 'true' }}
continue-on-error: true
run: |
cd test
bash test.sh ${{ env.SUFFIX }}
- name: PrepareSuffix
if: ${{ env.do_dynamic == 'true' }}
run: |
apt update
apt install -y libtiff5 libstdc++6 libgomp1 libgcc1
- name: TestSuffix
if: ${{ env.do_dynamic == 'true' }}
run: |
cd test
bash test.sh ${{ env.SUFFIX }}