mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-02-06 01:06:29 +00:00
This should be faster than the Intel runners. Seems to be at least twice as fast for uncached builds compared to `ubuntu-22.04`. - [x] ~~Move elixir checks to `macos-14`~~ can't; Depends on `docker` and `erlef/setup-beam` - [x] Add macOS targets to rust checks - [x] Move swift build to macos-14 - [x] Move kotlin build to macos-14 - [x] Name all jobs that are required for merge group to not depend on job config - [x] Update PR branch protection rules
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
name: Static Analysis
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
version-check:
|
|
runs-on: macos-14
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Check version is up to date
|
|
run: |
|
|
make version
|
|
if [ -z "$(git status --porcelain)" ]; then
|
|
# Working directory clean
|
|
echo "Version manifests up to date"
|
|
else
|
|
# Uncommitted changes
|
|
echo '`make version` found outdated files! Showing diff'
|
|
git diff
|
|
exit 1
|
|
fi
|
|
global-linter:
|
|
runs-on: macos-14
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
- uses: actions/cache/restore@v4
|
|
name: Restore Python Cache
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: macos-14-${{ runner.arch }}-pip-${{ hashFiles('requirements.txt') }}
|
|
restore-keys: |
|
|
macos-14-${{ runner.arch }}-pip-
|
|
- name: Install Python Dependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
- name: Run pre-commit
|
|
run: |
|
|
pre-commit install
|
|
SKIP=no-commit-to-branch pre-commit run --all-files
|
|
- uses: actions/cache/save@v4
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
name: Save Python Cache
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: macos-14-${{ runner.arch }}-pip-${{ hashFiles('requirements.txt') }}
|