Skip to content

Build extension with CI actions #7

Build extension with CI actions

Build extension with CI actions #7

Workflow file for this run

# 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-python310-linux:
runs-on: ubuntu-latest
env:
CI_COMMIT_MESSAGE: CI Build Extension for python310-linux
CI_COMMIT_AUTHOR: github-actions[bot]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install packages
run: |
python -m pip install --upgrade pip
pip install wheel numpy cython
pip install -e .
- name: Check if there are any changes
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: GIT Commit Build Artifacts
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "github-actions@users.noreply.github.com"
git add -A
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}"
git push
build-python310-windows:
runs-on: windows-latest
env:
CI_COMMIT_MESSAGE: CI Build Extension for python310-windows
CI_COMMIT_AUTHOR: github-actions[bot]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install packages
run: |
python -m pip install --upgrade pip
pip install wheel numpy cython
pip install -e .
- name: Check if there are any changes
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: GIT Commit Build Artifacts
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "github-actions@users.noreply.github.com"
git add -A
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}"
git push