This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/') | |