Update tag when building wheels as well #1209
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
# DO NOT MODIFY THIS FILE, IT IS GENERATED. | |
# To make changes, modify '.git/../utils/test-install-base.yml' | |
# and run 'ygggha' | |
env: | |
BUILDDOCKER: 0 | |
BUILDDOCS: 0 | |
BUILDSCHEMA: 0 | |
BUILDSOURCE: 1 | |
BUILDWHEELS: 1 | |
INSTALLC: 1 | |
INSTALLEXCEL: 1 | |
INSTALLFORTRAN: 1 | |
INSTALLIMAGES: 1 | |
INSTALLJULIA: 1 | |
INSTALLLPY: 0 | |
INSTALLMATLAB: 0 | |
INSTALLMPI: 1 | |
INSTALLOMP: 1 | |
INSTALLPYGMENTS: 1 | |
INSTALLPYTORCH: 1 | |
INSTALLR: 1 | |
INSTALLRMQ: 0 | |
INSTALLSBML: 0 | |
INSTALLSEQ: 1 | |
INSTALLTRIMESH: 1 | |
INSTALLZMQ: 1 | |
NUMPY: numpy | |
RELEASETAG: v1.10.1.post1 | |
TMPDIR: /tmp/ | |
USEVIRTUALENV: 0 | |
YGG_GHA_JOB_ID_SUFFIX: null | |
jobs: | |
build_sdist: | |
if: github.event_name == 'push' && needs.params.outputs.buildsource == '1' | |
name: Build source distribution | |
needs: params | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- if: needs.params.outputs.releasetag != '' | |
name: Update tag | |
run: 'git config user.name "Meagan Lang" | |
git tag -fa ${{ env.RELEASETAG }} -m "Release override" | |
' | |
- name: Build sdist | |
run: 'python setup.py sdist # --force-clean-version | |
' | |
- name: Install sdist | |
run: 'python -m pip install dist/*.gz | |
python utils/setup_test_env.py deps pip | |
' | |
- name: Test sdist | |
run: 'ygginfo | |
pytest -m subset_rapidjson --import-mode=importlib tests | |
' | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sdist | |
path: ./dist/* | |
build_wheels: | |
if: github.event_name == 'push' && needs.params.outputs.buildwheels == '1' | |
name: Build wheels on ${{ matrix.os }} | |
needs: params | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- if: needs.params.outputs.releasetag != '' | |
name: Update tag | |
run: 'git config user.name "Meagan Lang" | |
git tag -fa ${{ env.RELEASETAG }} -m "Release override" | |
' | |
- if: runner.os == 'Linux' | |
name: (LINUX) Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
with: | |
platforms: all | |
- if: ${{ matrix.windows_arch == 'x86' }} | |
name: setup rtools for 32-bit | |
run: 'echo "PLAT=i686" >> $env:GITHUB_ENV | |
echo "PATH=$env:RTOOLS40_HOME\mingw32\bin;$env:PATH" >> $env:GITHUB_ENV | |
gfortran --version | |
' | |
- env: | |
CIBW_ARCHS_LINUX: ${{ matrix.linux_arch }} | |
CIBW_ARCHS_MACOS: ${{ matrix.mac_arch }} | |
CIBW_ARCHS_WINDOWS: ${{ matrix.windows_arch }} | |
name: Build wheels | |
uses: pypa/[email protected] | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-2019 | |
windows_arch: x86 | |
- linux_arch: aarch64 | |
os: ubuntu-20.04 | |
- linux_arch: ppc64le | |
os: ubuntu-20.04 | |
linux_arch: | |
- auto | |
mac_arch: | |
- x86_64 arm64 | |
os: | |
- ubuntu-20.04 | |
- macOS-11 | |
- windows-2019 | |
windows_arch: | |
- AMD64 | |
docker: | |
if: github.event_name == 'push' && needs.params.outputs.builddocker == '1' | |
name: Build and Publish Docker images | |
needs: params | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
- name: Build and push environment docker images for the new release | |
run: python utils/build_docker.py --push | |
- name: Build and push executable docker images for the new release | |
run: python utils/build_docker.py --push executable | |
docs: | |
if: github.event_name == 'push' && needs.params.outputs.builddocs == '1' | |
name: Build the Docs | |
needs: params | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: python utils/setup_test_env.py install pip | |
- name: Verify installation | |
run: python utils/setup_test_env.py verify | |
- name: Build the docs | |
run: 'cd docs | |
make autodoc | |
cd ../ | |
' | |
- if: github.event_name == 'push' | |
name: Publish docs to Github pages | |
uses: JamesIves/[email protected] | |
with: | |
BRANCH: gh-pages | |
FOLDER: docs/build/html/ | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
params: | |
name: Prepare test parameters | |
outputs: | |
builddocker: ${{ steps.set-flags.outputs.builddocker }} | |
builddocs: ${{ steps.set-flags.outputs.builddocs }} | |
buildschema: ${{ steps.set-flags.outputs.buildschema }} | |
buildsource: ${{ steps.set-flags.outputs.buildsource }} | |
buildwheels: ${{ steps.set-flags.outputs.buildwheels }} | |
releasetag: ${{ steps.set-flags.outputs.releasetag }} | |
runs-on: ubuntu-latest | |
steps: | |
- id: set-flags | |
run: 'echo "builddocs=${{ env.BUILDDOCS }}" >> $GITHUB_OUTPUT | |
echo "buildwheels=${{ env.BUILDWHEELS }}" >> $GITHUB_OUTPUT | |
echo "buildsource=${{ env.BUILDSOURCE }}" >> $GITHUB_OUTPUT | |
echo "builddocker=${{ env.BUILDDOCKER }}" >> $GITHUB_OUTPUT | |
echo "buildschema=${{ env.BUILDSCHEMA }}" >> $GITHUB_OUTPUT | |
echo "releasetag=${{ env.RELEASETAG }}" >> $GITHUB_OUTPUT | |
' | |
schema: | |
if: github.event_name == 'push' && needs.params.outputs.buildschema == '1' | |
name: Update the schema used by the model submission form | |
needs: params | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: 'python -m pip install PyGithub | |
python utils/setup_test_env.py install pip | |
' | |
- name: Verify installation | |
run: python utils/setup_test_env.py verify | |
- name: Update the form | |
run: python utils/update_form_schema.py --token=${{ secrets.YGGDRASIL_UPDATE_TOKEN | |
}} | |
upload_sdist: | |
if: github.event_name == 'push' && needs.params.outputs.buildsource == '1' | |
name: Upload sdist | |
needs: | |
- params | |
- build_sdist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: sdist | |
path: dist | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.pypi }} | |
skip_existing: true | |
user: __token__ | |
upload_wheels: | |
if: github.event_name == 'push' && needs.params.outputs.buildwheels == '1' | |
name: Upload wheels | |
needs: | |
- params | |
- build_wheels | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifact | |
path: dist | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.pypi }} | |
skip_existing: true | |
user: __token__ | |
name: Test of package installation & execution | |
'on': | |
push: | |
branches-ignore: | |
- gh-pages | |
tags: | |
- '*' |