Build extension with CI actions #13
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 workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Build terrain analysis extension | |
on: | |
push: | |
branches: [ "master" ] | |
paths-ignore: [ "fct/lib/terrain_analysis*" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python: ["3.10", "3.11", "3.12", "3.13"] | |
runs-on: ${{ matrix.os }} | |
env: | |
CI_COMMIT_MESSAGE: CI Build Extension ${{ matrix.os }}-${{ matrix.python }} | |
CI_COMMIT_AUTHOR: github-actions[bot] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel setuptools numpy cython | |
pip install --no-build-isolation -e . | |
- name: GIT Commit Build Artifacts | |
if: steps.git_status.outputs != '' | |
run: | | |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | |
git config --global user.email "github-actions@users.noreply.github.com" | |
git pull | |
git add -A | |
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}" | |
git push |