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

Upgrade actions #3

Merged
merged 5 commits into from
Aug 16, 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
68 changes: 68 additions & 0 deletions .convco
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
header: |
# Changelog
types:
- type: feat
increment: Minor
section: Features
hidden: false
- type: fix
increment: Patch
section: Fixes
hidden: false
- type: build
increment: None
section: Other
hidden: true
- type: chore
increment: None
section: Other
hidden: true
- type: ci
increment: None
section: Other
hidden: true
- type: docs
increment: None
section: Documentation
hidden: true
- type: style
increment: None
section: Other
hidden: true
- type: refactor
increment: None
section: Other
hidden: true
- type: perf
increment: None
section: Other
hidden: true
- type: test
increment: None
section: Other
hidden: true
preMajor: false
commitUrlFormat: '{{@root.host}}/{{@root.owner}}/{{@root.repository}}/commit/{{hash}}'
compareUrlFormat: '{{@root.host}}/{{@root.owner}}/{{@root.repository}}/compare/{{previousTag}}...{{currentTag}}'
issueUrlFormat: '{{@root.host}}/{{@root.owner}}/{{@root.repository}}/issues/{{issue}}'
userUrlFormat: '{{host}}/{{user}}'
releaseCommitMessageFormat: 'chore(release): {{currentTag}}'
issuePrefixes:
- '#'
host: null
owner: null
repository: null
template: null
commitTemplate: null
scopeRegex: ^[[:alnum:]]+(?:[-_/][[:alnum:]]+)*$
lineLength: 80
wrapDisabled: false
linkCompare: true
linkReferences: true
merges: false
firstParent: false
stripRegex: ''
description:
length:
min: 10
max: null
49 changes: 29 additions & 20 deletions .github/workflows/essentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ on:

jobs:
test:
name: Test
name: Quality checks & tests
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
components: rustfmt, clippy

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event.pull_request.commits }}
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
# fetch-depth: ${{ github.event.pull_request.commits }}

- name: Cache crates from crates.io
uses: actions/cache@v3
uses: actions/cache@v4
continue-on-error: false
with:
path: |
Expand All @@ -48,35 +48,44 @@ jobs:
- name: Quality - convco check
run: |
git show-ref
echo Commit message: "$(git log -1 --pretty=%B)"
curl -sSfLO https://github.com/convco/convco/releases/latest/download/convco-ubuntu.zip
unzip convco-ubuntu.zip
chmod +x convco
./convco check
./convco --version
./convco check -c .convco
rm convco

- name: Quality - cargo deny check
run: |
curl -sSfL https://github.com/EmbarkStudios/cargo-deny/releases/download/0.14.2/cargo-deny-0.14.2-x86_64-unknown-linux-musl.tar.gz | tar zx --no-anchored cargo-deny --strip-components=1
curl -sSfL https://github.com/EmbarkStudios/cargo-deny/releases/download/0.16.1/cargo-deny-0.16.1-x86_64-unknown-linux-musl.tar.gz | tar zx --no-anchored cargo-deny --strip-components=1
chmod +x cargo-deny
mv cargo-deny ~/.cargo/bin/
cargo deny check

- name: Install cargo check tools
- name: Quality - cargo audit check
run: |
curl -sSfL https://github.com/rustsec/rustsec/releases/download/cargo-audit%2Fv0.17.3/cargo-audit-x86_64-unknown-linux-musl-v0.17.3.tgz | tar zx --no-anchored cargo-audit --strip-components=1
chmod +x cargo-audit
mv cargo-audit ~/.cargo/bin/
rm -rf ~/.cargo/advisory-db/
cargo audit --ignore RUSTSEC-2020-0071 # time-rs, but not used by chrono, see https://github.com/chronotope/chrono/issues/602

- name: Quality - cargo outdated
timeout-minutes: 20
if: ${{ matrix.rust == 'stable' }}
run: |
cargo install --locked cargo-outdated || true
# cargo install --locked cargo-udeps || true # needs nightly
cargo install --locked cargo-audit || true
cargo install --locked cargo-pants || true
rm -rf ~/.cargo/advisory-db
cargo outdated --exit-code 1

- name: Check
if: ${{ matrix.rust == 'stable' }}
# - name: Quality - cargo udeps (needs nightly)
# run: |
# cargo install --locked cargo-udeps || true
# cargo udeps

- name: Quality - cargo pants
run: |
cargo outdated --exit-code 1
# cargo udeps
rm -rf ~/.cargo/advisory-db
cargo audit --ignore RUSTSEC-2020-0071 # time-rs, but not used by chrono, see https://github.com/chronotope/chrono/issues/602
cargo install --locked cargo-pants || true
cargo pants

- name: Build (dev)
Expand Down
127 changes: 80 additions & 47 deletions .github/workflows/large-scope.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.50.0, beta, nightly]
# rust: [1.74.0, beta, nightly]
rust: [1.74.0, beta]

steps:
- name: Rust install
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
components: rustfmt, clippy

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache crates from crates.io
uses: actions/cache@v3
uses: actions/cache@v4
continue-on-error: false
with:
path: |
Expand All @@ -43,22 +42,46 @@ jobs:
cargo fmt --all -- --check
cargo clippy -- -D warnings

# - name: Install cargo check tools
# - name: Quality - convco check
# run: |
# git show-ref
# curl -sSfLO https://github.com/convco/convco/releases/latest/download/convco-ubuntu.zip
# unzip convco-ubuntu.zip
# chmod +x convco
# ./convco --version
# ./convco check -c .convco
# rm convco

# - name: Quality - cargo deny check
# run: |
# curl -sSfL https://github.com/EmbarkStudios/cargo-deny/releases/download/0.12.2/cargo-deny-0.12.2-x86_64-unknown-linux-musl.tar.gz | tar zx --no-anchored cargo-deny --strip-components=1
# chmod +x cargo-deny
# mv cargo-deny ~/.cargo/bin/
# cargo deny check

# - name: Quality - cargo audit check
# run: |
# curl -sSfL https://github.com/rustsec/rustsec/releases/download/cargo-audit%2Fv0.17.3/cargo-audit-x86_64-unknown-linux-musl-v0.17.3.tgz | tar zx --no-anchored cargo-audit --strip-components=1
# chmod +x cargo-audit
# mv cargo-audit ~/.cargo/bin/
# rm -rf ~/.cargo/advisory-db/
# cargo audit --ignore RUSTSEC-2020-0071 # time-rs, but not used by chrono, see https://github.com/chronotope/chrono/issues/602

# - name: Quality - cargo outdated
# timeout-minutes: 20
# if: ${{ matrix.rust == 'stable' }}
# run: |
# cargo install --locked cargo-outdated || true
# # cargo install --locked cargo-udeps || true # needs nightly
# cargo install --locked cargo-audit || true
# cargo install --locked cargo-pants || true
# rm -rf ~/.cargo/advisory-db
# cargo outdated --exit-code 1

# - name: Check
# if: ${{ matrix.rust == 'stable' }}
# - name: Quality - cargo udeps (needs nightly)
# run: |
# cargo outdated --exit-code 1
# # cargo udeps
# rm -rf ~/.cargo/advisory-db
# cargo audit --ignore RUSTSEC-2020-0071 # time-rs, but not used by chrono, see https://github.com/chronotope/chrono/issues/602
# cargo install --locked cargo-udeps || true
# cargo udeps

# - name: Quality - cargo pants
# run: |
# cargo install --locked cargo-pants || true
# cargo pants

- name: Build (dev)
Expand All @@ -76,30 +99,31 @@ jobs:
strategy:
matrix:
include:
- os: macos-latest
- os: macos-13
target: x86_64-apple-darwin
type: unix
toolchain: stable
- os: macos-latest
target: aarch64-apple-darwin
type: unix
toolchain: stable
- os: windows-latest
target: x86_64-pc-windows-msvc
type: windows
toolchain: stable
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
override: true
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
components: rustfmt, clippy

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache crates from crates.io
uses: actions/cache@v3
uses: actions/cache@v4
continue-on-error: false
with:
path: |
Expand All @@ -110,46 +134,55 @@ jobs:
target/
key: '${{ runner.os }}-${{ matrix.target }}-cargo-stable-${{ hashFiles(''**/Cargo.lock'') }}'

- name: Lint
run: |
cargo fmt --all -- --check
cargo clippy -- -D warnings
# - name: Quality - cargo fmt
# run: |
# cargo fmt --all -- --check

# - name: Quality - cargo clippy
# run: |
# cargo clippy -- -D warnings

# - name: Quality - convco check
# run: |
# git show-ref
# curl -sSfLO https://github.com/convco/convco/releases/latest/download/convco-ubuntu.zip
# unzip convco-ubuntu.zip
# chmod +x convco
# ./convco check
# ./convco --version
# ./convco check -c .convco
# rm convco
# shell: bash

# - name: Quality - cargo deny check
# run: |
# curl -sSfL https://github.com/EmbarkStudios/cargo-deny/releases/download/0.12.2/cargo-deny-0.12.2-x86_64-unknown-linux-musl.tar.gz | tar zx --no-anchored cargo-deny --strip-components=1
# chmod +x cargo-deny
# mv cargo-deny ~/.cargo/bin/
# cargo deny check
# shell: bash

- name: Install cargo check tools
timeout-minutes: 20
run: |
cargo install --locked cargo-outdated || true
# cargo install --locked cargo-udeps || true # needs nightly
cargo install --locked cargo-audit || true
cargo install --locked cargo-pants || true
shell: bash
# - name: Quality - cargo audit check
# run: |
# curl -sSfL https://github.com/rustsec/rustsec/releases/download/cargo-audit%2Fv0.17.3/cargo-audit-x86_64-unknown-linux-musl-v0.17.3.tgz | tar zx --no-anchored cargo-audit --strip-components=1
# chmod +x cargo-audit
# mv cargo-audit ~/.cargo/bin/
# rm -rf ~/.cargo/advisory-db/
# cargo audit --ignore RUSTSEC-2020-0071 # time-rs, but not used by chrono, see https://github.com/chronotope/chrono/issues/602

- name: Check
run: |
cargo outdated --exit-code 1
# cargo udeps
rm -rf ~/.cargo/advisory-db
cargo audit --ignore RUSTSEC-2020-0071 # time-rs, but not used by chrono, see https://github.com/chronotope/chrono/issues/602
cargo pants
shell: bash
# - name: Quality - cargo outdated
# timeout-minutes: 20
# run: |
# cargo install --locked cargo-outdated || true
# rm -rf ~/.cargo/advisory-db
# cargo outdated --exit-code 1

# - name: Quality - cargo udeps (needs nightly)
# run: |
# cargo install --locked cargo-udeps || true
# cargo udeps

# - name: Quality - cargo pants
# run: |
# cargo install --locked cargo-pants || true
# cargo pants

- name: Build (dev)
run: cargo build --all-features
Expand Down
Loading