Skip to content

Build extension with CI actions #6

Build extension with CI actions

Build extension with CI actions #6

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
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: GIT Commit Build Artifacts
# Only run on main branch push (e.g. after pull request merge).
# if: github.event_name == 'push'
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "username@users.noreply.github.com"
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
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: GIT Commit Build Artifacts
# Only run on main branch push (e.g. after pull request merge).
# if: github.event_name == 'push'
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "username@users.noreply.github.com"
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}"
git push