[pre-commit.ci] pre-commit autoupdate #483
Workflow file for this run
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
# This CI run builds wheels using the cibuildwheel infrastructure | |
# to build the C++ binaries (with no Python wrappers). | |
name: installers | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
on: | |
push: | |
branches: [ main ] | |
tags: | |
- '*' | |
pull_request: | |
branches: [ main ] | |
env: | |
BUILD_TYPE: Release | |
# https://cibuildwheel.readthedocs.io/en/stable/setup/#github-actions | |
jobs: | |
apps: | |
continue-on-error: false | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
- os: macos-11 | |
archs_macos: "x86_64" | |
- os: macos-11 | |
archs_macos: "arm64" | |
- os: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- uses: hendrikmuhs/ccache-action@v1.2 | |
if: matrix.os != 'ubuntu-20.04' | |
with: | |
key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.archs_macos }} | |
- name: Cache vcpkg | |
if: matrix.os != 'ubuntu-20.04' | |
uses: actions/cache@v4 | |
with: | |
path: | | |
vcpkg | |
build/vcpkg_installed | |
key: ${{ github.job }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}-${{ matrix.os }}-${{ matrix.archs_macos }}-0 | |
# cibuildwheel@2.11.2 okay, @2.11.3 bad b/c of quay.io/pypa/manylinux_2_28_x86_64:2022-11-27-b2d7fda | |
# "libOpenMEEGMaths.so.1: ELF load command address/offset not properly aligned" | |
# so use the last known good image below | |
- uses: pypa/cibuildwheel@v2.17.0 | |
with: | |
package-dir: ./wrapping/python | |
output-dir: installers | |
env: | |
CIBW_ARCHS_MACOS: "${{matrix.archs_macos}}" | |
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux_2_28_x86_64:2022-10-25-fbea779" | |
CIBW_ENVIRONMENT_LINUX: "RUNNER_OS=Linux" | |
CIBW_ENVIRONMENT_MACOS: "OPENMEEG_MACOS_WHEEL_PURE=false" | |
CIBW_ENVIRONMENT_WINDOWS: "" | |
CIBW_BUILD: "cp310-*" | |
CIBW_BUILD_FRONTEND: "pip" | |
CIBW_BEFORE_ALL: "bash {project}/build_tools/cibw_before_all_apps.sh {project}" | |
CIBW_BEFORE_BUILD_WINDOWS: "" | |
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "" | |
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "" | |
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "" | |
CIBW_TEST_COMMAND: "bash {project}/build_tools/cibw_test_command_apps.sh {project}" | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: | | |
./installers/OpenMEEG-*.tar.gz | |
name: OpenMEEG-installers-${{ matrix.os }}-${{ matrix.archs_macos }} | |
release: | |
needs: [apps] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
- name: Set vars | |
id: vars | |
run: | | |
set -e | |
echo "Using ref_type=${{ github.ref_type }}" | |
if [[ "${{ github.ref_type }}" != "tag" ]]; then | |
echo 'name=dev' >> $GITHUB_OUTPUT # default empty uses tag | |
echo 'body=body.md' >> $GITHUB_OUTPUT # default empty | |
else | |
echo 'generate=true' >> $GITHUB_OUTPUT # default false | |
fi | |
echo "# Development release" >> body.md | |
echo "" >> body.md | |
echo "This is an unreleased draft version (only visible to maintainers)." >> body.md | |
echo "" >> body.md | |
echo "- Created: $(date +'%Y-%m-%dT%H:%M:%S%z')" >> body.md | |
echo "- Commit: `${{ github.sha }}`" >> body.md | |
cat body.md | |
- name: Check files | |
run: | | |
set -e | |
ls -alR . | |
for key in body name generate; do | |
echo "Using vars.outputs.${key}=${{ steps.vars.outputs.body }}" | |
done | |
# https://github.com/ncipollo/release-action | |
# https://github.com/softprops/action-gh-release | |
- uses: softprops/action-gh-release@v2 | |
if: github.ref_type == 'tag' || github.event_name != 'pull_request' | |
with: | |
draft: true | |
prerelease: true | |
body_path: ${{ steps.vars.outputs.body }} | |
generate_release_notes: ${{ steps.vars.outputs.generate }} | |
tag_name: ${{ steps.vars.outputs.name }} | |
files: OpenMEEG-* |