forked from Tulip-Dev/tulip
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (55 loc) · 1.96 KB
/
manylinux-wheel-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
name: manylinux-wheel-build
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
manylinux:
name: Talipot manylinux Python wheel build on CentOS 7.9
runs-on: ubuntu-22.04
env:
DOCKER_IMAGE: quay.io/pypa/manylinux2014_x86_64
steps:
- name: Checkout Talipot code
uses: actions/checkout@v4
- name: Get current date
id: get-current-date
run: |
echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT
shell: bash
- name: Cache files
uses: actions/cache@v4
with:
path: ~/ccache
key: manylinux2014-ccache-${{ steps.get-current-date.outputs.date }}
restore-keys: |
manylinux2014-ccache-
save-always: true
- name: Pull ${{ env.DOCKER_IMAGE }} docker image
run: docker pull ${DOCKER_IMAGE}
- name: Create ccache docker volume
run: docker create
-v ~/ccache:/ccache
--name ccache
${DOCKER_IMAGE}
- name: Build and upload Talipot Python wheel
run: docker run
-e CCACHE_DIR=/ccache
--volumes-from ccache
-v `pwd`:/talipot:rw
${DOCKER_IMAGE}
/bin/bash -c
"bash -x /talipot/bundlers/linux/talipot_python_wheels_manylinux_build.sh
${{ secrets.TEST_PYPI_API_TOKEN }}
${{ github.ref }}"
- name: Test uploaded wheel
if: github.ref == 'refs/tags/dev-latest'
working-directory: tests/python
run: |
# wait one minute to ensure freshly uploaded wheels are registered on PyPI
sleep 60
sudo apt install python3-pip
pip3 install --upgrade pip --user
pip3 install --index-url https://test.pypi.org/simple/ talipot --user
python3 -c "from talipot import tlp; print(tlp.getLayoutAlgorithmPluginsList())"
TALIPOT_BUILD_DIR= python3 -m unittest discover