Skip to content

ci: fix when "github.base_ref" is from master branch. #1019

ci: fix when "github.base_ref" is from master branch.

ci: fix when "github.base_ref" is from master branch. #1019

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://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: fluster
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
commit-validation:
name: Validate commits
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install pre-commit
run: pip install pre-commit==2.21.0
- name: Install pre-commit hooks
run: pre-commit install
- name: Validate all commit messages
run: |
git fetch --prune --unshallow
BASE_REF=${{ github.base_ref }}
if [ -z "$BASE_REF" ]; then
BASE_REF="master"
fi
git rev-list --no-merges origin/$BASE_REF..${{ github.sha }} > commits.txt
while read commit; do
echo "Validate commit: $commit"
git show -s --format=%B $commit > commit-msg.txt
pre-commit run conventional-pre-commit --hook-stage commit-msg --commit-msg-filename commit-msg.txt || exit 1
done < commits.txt
- name: Validate all files
run: |
pre-commit run --all-files --show-diff-on-failure
min_linux:
name: linux with min supported deps
runs-on: ubuntu-20.04
needs:
- commit-validation
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install dependencies
run: |
make install_deps
sudo apt update && sudo apt install gstreamer1.0-tools gstreamer1.0-libav gstreamer1.0-plugins-bad ffmpeg vpx-tools aom-tools
- name: Check
run: |
make check
- name: Test Build the wheel
run: |
pip wheel .
linux:
runs-on: ubuntu-24.04
needs:
- commit-validation
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install dependencies
run: |
make install_deps
sudo apt update && sudo apt install gstreamer1.0-tools gstreamer1.0-libav gstreamer1.0-plugins-bad ffmpeg vpx-tools aom-tools
- name: Check
run: |
make check
- name: Test Build the wheel
run: |
pip wheel .
windows:
runs-on: windows-latest
needs:
- commit-validation
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install dependencies
run: |
make install_deps
- name: Check
run: |
make check
- name: Test Build the wheel
run: |
pip wheel .