mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-27 07:34:27 +02:00
ci: clean up CI, update python action + version (#1636)
* ci: clean up CI * bump python action, also version to 3.12
This commit is contained in:
parent
bc3032cf10
commit
5b1163d29b
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@ -1,5 +1,5 @@
|
|||||||
# Main CI workflow to validate PRs and branches are correctly formatted
|
# Main CI workflow to validate that files are formatted correctly, pass tests,
|
||||||
# and pass tests.
|
# and pass lints.
|
||||||
#
|
#
|
||||||
# CI workflow was based on a lot of work from other people:
|
# CI workflow was based on a lot of work from other people:
|
||||||
# - https://github.com/heim-rs/heim/blob/master/.github/workflows/ci.yml
|
# - https://github.com/heim-rs/heim/blob/master/.github/workflows/ci.yml
|
||||||
@ -8,16 +8,12 @@
|
|||||||
# - https://matklad.github.io/2021/09/04/fast-rust-builds.html
|
# - https://matklad.github.io/2021/09/04/fast-rust-builds.html
|
||||||
#
|
#
|
||||||
# Supported platforms run the following tasks:
|
# Supported platforms run the following tasks:
|
||||||
# - cargo fmt
|
# - Format
|
||||||
# - cargo test (built/test in separate steps)
|
# - Test (built/test in separate steps)
|
||||||
# - cargo clippy (apparently faster to do it after the build/test)
|
# - Clippy (apparently faster to do it after the build/test)
|
||||||
#
|
#
|
||||||
# Unsupported platforms run the following tasks:
|
# Unsupported platforms run the following tasks:
|
||||||
# - cargo build
|
# - Clippy
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
name: ci
|
name: ci
|
||||||
|
|
||||||
@ -250,7 +246,7 @@ jobs:
|
|||||||
key: ${{ matrix.info.target }}
|
key: ${{ matrix.info.target }}
|
||||||
cache-all-crates: true
|
cache-all-crates: true
|
||||||
|
|
||||||
- name: Check (default features)
|
- name: Clippy (default features)
|
||||||
uses: ClementTsang/cargo-action@v0.0.5
|
uses: ClementTsang/cargo-action@v0.0.5
|
||||||
if: ${{ matrix.info.no-default-features != true }}
|
if: ${{ matrix.info.no-default-features != true }}
|
||||||
with:
|
with:
|
||||||
@ -259,7 +255,7 @@ jobs:
|
|||||||
use-cross: ${{ matrix.info.cross }}
|
use-cross: ${{ matrix.info.cross }}
|
||||||
cross-version: ${{ matrix.info.cross-version || '0.2.5' }}
|
cross-version: ${{ matrix.info.cross-version || '0.2.5' }}
|
||||||
|
|
||||||
- name: Check (no features enabled)
|
- name: Clippy (no features enabled)
|
||||||
uses: ClementTsang/cargo-action@v0.0.5
|
uses: ClementTsang/cargo-action@v0.0.5
|
||||||
if: ${{ matrix.info.no-default-features == true }}
|
if: ${{ matrix.info.no-default-features == true }}
|
||||||
with:
|
with:
|
||||||
@ -312,7 +308,7 @@ jobs:
|
|||||||
key: ${{ matrix.info.target }}-${{ matrix.info.os_release }}
|
key: ${{ matrix.info.target }}-${{ matrix.info.os_release }}
|
||||||
cache-all-crates: true
|
cache-all-crates: true
|
||||||
|
|
||||||
- name: Test FreeBSD
|
- name: Clippy (FreeBSD)
|
||||||
if: ${{ matrix.info.type == 'freebsd' }}
|
if: ${{ matrix.info.type == 'freebsd' }}
|
||||||
uses: vmactions/freebsd-vm@v1.0.8
|
uses: vmactions/freebsd-vm@v1.0.8
|
||||||
with:
|
with:
|
||||||
|
5
.github/workflows/docs.yml
vendored
5
.github/workflows/docs.yml
vendored
@ -1,6 +1,7 @@
|
|||||||
# Workflow to deploy mkdocs documentation.
|
# Workflow to deploy mkdocs documentation.
|
||||||
|
|
||||||
name: docs
|
name: docs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
@ -25,9 +26,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
|
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.12
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: pip install -r docs/requirements.txt
|
run: pip install -r docs/requirements.txt
|
||||||
|
16
.github/workflows/post_release.yml
vendored
16
.github/workflows/post_release.yml
vendored
@ -27,22 +27,18 @@ jobs:
|
|||||||
version: ${{ env.VERSION }}
|
version: ${{ env.VERSION }}
|
||||||
steps:
|
steps:
|
||||||
- name: Get the release version from the tag
|
- name: Get the release version from the tag
|
||||||
if: env.VERSION == ''
|
|
||||||
run: |
|
run: |
|
||||||
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
|
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
|
||||||
echo "Manual run against a tag; overriding actual tag in the environment..."
|
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
|
else
|
||||||
echo "VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
|
echo "VERSION=${{ github.event.release.tag_name }}" >> "$GITHUB_ENV"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Test env
|
|
||||||
run: |
|
|
||||||
echo ${{ env.VERSION }}
|
|
||||||
|
|
||||||
- name: Make sure you're not on master/main/nightly
|
- name: Make sure you're not on master/main/nightly
|
||||||
run: |
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -64,9 +60,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
|
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.12
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: pip install -r docs/requirements.txt
|
run: pip install -r docs/requirements.txt
|
||||||
|
5
.github/workflows/test_docs.yml
vendored
5
.github/workflows/test_docs.yml
vendored
@ -1,6 +1,7 @@
|
|||||||
# Small CI workflow to test if mkdocs documentation can be successfully built.
|
# Small CI workflow to test if mkdocs documentation can be successfully built.
|
||||||
|
|
||||||
name: test docs
|
name: test docs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -33,9 +34,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
|
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.12
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: pip install -r docs/requirements.txt
|
run: pip install -r docs/requirements.txt
|
||||||
|
4
.github/workflows/validate_schema.yml
vendored
4
.github/workflows/validate_schema.yml
vendored
@ -39,9 +39,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
|
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.12
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: pip install -r scripts/schema/requirements.txt
|
run: pip install -r scripts/schema/requirements.txt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user