Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: clean up CI, update python action + version #1636

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Main CI workflow to validate PRs and branches are correctly formatted
# and pass tests.
# Main CI workflow to validate that files are formatted correctly, pass tests,
# and pass lints.
#
# CI workflow was based on a lot of work from other people:
# - https://github.com/heim-rs/heim/blob/master/.github/workflows/ci.yml
Expand All @@ -8,16 +8,12 @@
# - https://matklad.github.io/2021/09/04/fast-rust-builds.html
#
# Supported platforms run the following tasks:
# - cargo fmt
# - cargo test (built/test in separate steps)
# - cargo clippy (apparently faster to do it after the build/test)
# - Format
# - Test (built/test in separate steps)
# - Clippy (apparently faster to do it after the build/test)
#
# Unsupported platforms run the following tasks:
# - cargo build
#
# Note that not all platforms are tested using this CI action! There are some
# tested by Cirrus CI due to (free) platform limitations on GitHub. Currently,
# this is just macOS M1 and FreeBSD.
# - Clippy

name: ci

Expand Down Expand Up @@ -250,7 +246,7 @@ jobs:
key: ${{ matrix.info.target }}
cache-all-crates: true

- name: Check (default features)
- name: Clippy (default features)
uses: ClementTsang/[email protected]
if: ${{ matrix.info.no-default-features != true }}
with:
Expand All @@ -259,7 +255,7 @@ jobs:
use-cross: ${{ matrix.info.cross }}
cross-version: ${{ matrix.info.cross-version || '0.2.5' }}

- name: Check (no features enabled)
- name: Clippy (no features enabled)
uses: ClementTsang/[email protected]
if: ${{ matrix.info.no-default-features == true }}
with:
Expand Down Expand Up @@ -312,7 +308,7 @@ jobs:
key: ${{ matrix.info.target }}-${{ matrix.info.os_release }}
cache-all-crates: true

- name: Test FreeBSD
- name: Clippy (FreeBSD)
if: ${{ matrix.info.type == 'freebsd' }}
uses: vmactions/[email protected]
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Workflow to deploy mkdocs documentation.

name: docs

on:
workflow_dispatch:
push:
Expand All @@ -25,9 +26,9 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.11
python-version: 3.12

- name: Install Python dependencies
run: pip install -r docs/requirements.txt
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/post_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,18 @@ jobs:
version: ${{ env.VERSION }}
steps:
- name: Get the release version from the tag
if: env.VERSION == ''
run: |
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
echo "Manual run against a tag; overriding actual tag in the environment..."
echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
echo "VERSION=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
else
echo "VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
echo "VERSION=${{ github.event.release.tag_name }}" >> "$GITHUB_ENV"
fi

- name: Test env
run: |
echo ${{ env.VERSION }}

- name: Make sure you're not on master/main/nightly
run: |
if [[ ${{ env.VERSION }} == "master" || ${{ env.VERSION }} == "main" || ${{ env.VERSION }} == "nightly" ]]; then
echo ${{ env.VERSION }}
if [[ ${{ env.VERSION }} == "master" || ${{ env.VERSION }} == "main" || ${{ env.VERSION }} == "nightly" ]]; then
exit 1
fi

Expand All @@ -64,9 +60,9 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.11
python-version: 3.12

- name: Install Python dependencies
run: pip install -r docs/requirements.txt
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test_docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Small CI workflow to test if mkdocs documentation can be successfully built.

name: test docs

on:
workflow_dispatch:
pull_request:
Expand Down Expand Up @@ -33,9 +34,9 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.11
python-version: 3.12

- name: Install Python dependencies
run: pip install -r docs/requirements.txt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.11
python-version: 3.12

- name: Install Python dependencies
run: pip install -r scripts/schema/requirements.txt
Expand Down
Loading