[pre-commit.ci] pre-commit autoupdate #239
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
name: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Install Garden | |
run: cargo install garden-tools | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install build dependencies | |
run: | | |
set -x | |
sudo apt-get update | |
sudo apt-get install python3-sphinx python3-qtpy python3-pyqt5 | |
- name: Install Git Cola | |
run: garden -vv -D prefix=dist install | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Install Garden | |
run: cargo install garden-tools | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install Dependencies | |
run: | | |
set -x | |
sudo apt-get update | |
# Runtime dependencies (required) | |
sudo apt-get install \ | |
python3-qtpy \ | |
python3-pyqt5 | |
# Runtime dependencies (optional) | |
sudo apt-get install \ | |
python3-send2trash | |
# Development dependencies | |
sudo apt-get install \ | |
python3-pytest \ | |
python3-setuptools-scm \ | |
python3-sphinx | |
pip install cercis | |
- name: Configure tests | |
run: | | |
git config --global user.name "Git Cola" | |
git config --global user.email git-cola@localhost | |
- name: Run tests and checks | |
run: garden -vv check | |
- name: Code formatting | |
run: garden -vv fmt -- --check | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
architecture: x64 | |
- name: Pip Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/AppData/Local/pip/Cache | |
key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }} | |
- name: Install Dependencies | |
run: | | |
pip install '.[build,docs,dev,extras]' | |
# Based on: contrib/win32/run-pynsist.sh | |
- name: Build Installer | |
run: | | |
make doc | |
make htmldir="$PWD/share/doc/git-cola/html" install-doc | |
pynsist pynsist.cfg | |
rm -r share/doc/git-cola/html | |
# Rename executable output | |
cd build/nsis | |
mv git-cola*.exe git-cola-latest-${{github.run_number}}.exe | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: git-cola-latest-${{github.run_number}}-${{runner.os}} | |
path: build/nsis/git-cola*.exe | |
macos: | |
name: macOS | |
runs-on: macos-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Install Garden | |
run: cargo install garden-tools | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install Dependencies | |
run: | | |
brew install git-cola | |
- name: Build Bundle | |
run: | | |
garden -vv macos/app | |
mv git-cola.app build/ | |
- name: Zip Artifact | |
run: zip -r git-cola.app.zip build/* | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: git-cola-latest-${{github.run_number}}-${{runner.os}} | |
path: git-cola.app.zip |