release-main #49
Workflow file for this run
This file contains hidden or 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: release-main | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [published] | |
| branches: [main] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [macos-13, windows-latest, ubuntu-latest, macos-14] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 2 | |
| - name: remove nativelibs and localsolvers | |
| run: rm -rf vcell_submodule/nativelibs vcell_submodule/localsolvers | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - uses: abatilo/actions-poetry@v3 | |
| - name: setup graalvm for static native build | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: "23" | |
| distribution: "graalvm-community" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| components: "native-image" | |
| native-image-job-reports: "true" | |
| cache: "maven" | |
| # - name: Install python dependencies | |
| # run: poetry install --no-interaction | |
| # if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') )}} | |
| - name: Set MACOSX_DEPLOYMENT_TARGET used by cibuildwheel | |
| if: ${{ startsWith(matrix.os, 'macos') }} | |
| run: echo "MACOSX_DEPLOYMENT_TARGET=${{ matrix.os == 'macos-14' && '14.0' || '13.0' }}" >> $GITHUB_ENV | |
| - name: Run cibuildwheel | |
| run: | | |
| pip install cibuildwheel | |
| cibuildwheel --debug-traceback --output-dir wheelhouse | |
| env: | |
| # CIBW_BEFORE_ALL_LINUX: | | |
| # cd /opt | |
| # | |
| # # Install GraalVM | |
| # export GRAALVM_VERSION=23.0.2 | |
| # export ARCH=x86_64 && \ | |
| # curl -L -o graalvm.tar.gz https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-23.0.2/graalvm-community-jdk-23.0.2_linux-x64_bin.tar.gz | |
| # tar -xzf graalvm.tar.gz | |
| # export GRAALVM_HOME=/opt/graalvm-community-openjdk-23.0.2+7.1 | |
| # export JAVA_HOME=/opt/graalvm-community-openjdk-23.0.2+7.1 | |
| # export PATH=/opt/graalvm-community-openjdk-23.0.2+7.1/bin:$PATH | |
| # echo 'export JAVA_HOME=/opt/graalvm-community-openjdk-23.0.2+7.1' >> ~/.bashrc | |
| # echo 'export GRAALVM_HOME=/opt/graalvm-community-openjdk-23.0.2+7.1' >> ~/.bashrc | |
| # echo 'export PATH=/opt/graalvm-community-openjdk-23.0.2+7.1/bin:$PATH' >> ~/.bashrc | |
| # | |
| # # install Poetry | |
| # curl -sSL https://install.python-poetry.org | python3 - | |
| # export PATH=/root/.local/bin:$PATH | |
| # echo 'export PATH=/root/.local/bin:$PATH' >> ~/.bashrc | |
| # | |
| # # Install Maven | |
| # export MAVEN_VERSION=3.9.9 | |
| # curl -L -o apache-maven.tar.gz https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz | |
| # tar -xzf apache-maven.tar.gz | |
| # export MAVEN_HOME=/opt/apache-maven-3.9.9 | |
| # export PATH=/opt/apache-maven-3.9.9/bin:$PATH | |
| # echo 'export MAVEN_HOME=/opt/apache-maven-3.9.9' >> ~/.bashrc | |
| # echo 'export PATH=/opt/apache-maven-3.9.9/bin:$PATH' >> ~/.bashrc | |
| # | |
| # native-image --version | |
| # mvn --version | |
| # poetry --version | |
| CIBW_BUILD_VERBOSITY_LINUX: 3 | |
| CIBW_DEBUG_TRACEBACK: TRUE | |
| CIBW_DEBUG_KEEP_CONTAINER: TRUE | |
| - name: Copy wheels to dist directory | |
| run: | | |
| mkdir -p dist | |
| cp wheelhouse/*.whl dist/ | |
| - name: Publish to PyPI | |
| run: | | |
| poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}" | |
| poetry publish --dry-run | |
| # poetry publish --skip-existing | |
| - name: Setup tmate | |
| if: failure() | |
| uses: mxschmitt/action-tmate@v3 | |
| with: | |
| limit-access-to-actor: true | |
| deploy-docs: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - uses: abatilo/actions-poetry@v3 | |
| - name: setup graalvm for static native build | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: "23" | |
| distribution: "graalvm-community" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| components: "native-image" | |
| native-image-job-reports: "true" | |
| cache: "maven" | |
| - name: Install python dependencies | |
| run: poetry install --no-interaction | |
| - name: Deploy documentation | |
| run: poetry run mkdocs gh-deploy --force |