-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (36 loc) · 1.26 KB
/
linux_build_test.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
name: Linux Build-Test
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install libarchive
run: sudo apt install libarchive-dev
shell: bash
- name: Configure CMake
run: cmake -B ${{ github.workspace }}/build -S ${{ github.workspace }}
- name: Build
run: cmake -B ${{ github.workspace }}/build
- name: Run tests
working-directory: ${{ github.workspace }}/build
run: ctest
- name: Build manylinux wheels
working-directory: ${{ github.workspace }}
run: |
chmod a+x build-wheels.sh
mkdir wheelhouse
export DOCKER_IMAGE=quay.io/pypa/manylinux_2_28_x86_64
docker pull $DOCKER_IMAGE
docker run --rm -v ${{ github.workspace }}:/io $DOCKER_IMAGE /io/build-wheels.sh
if: startsWith(github.ref, 'refs/tags/')
- name: Publish package to TestPyPI
shell: bash
run: |
pip install twine
export TWINE_USERNAME="__token__"
export TWINE_PASSWORD="${{ secrets.TEST_PYPI_API_TOKEN }}"
twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ wheelhouse/* --verbose
if: startsWith(github.ref, 'refs/tags/')