-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/useReferenceForAsyncSigner
- Loading branch information
Showing
145 changed files
with
5,479 additions
and
1,703 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
rules: | ||
# Body may be empty | ||
body-empty: | ||
level: ignore | ||
|
||
# Description must not be empty | ||
description-empty: | ||
level: error | ||
|
||
# Description must start with a capital letter and must not end with a period or space | ||
description-format: | ||
level: error | ||
format: ^[A-Z0-9].*[^. ]$ | ||
|
||
# Description should be <70 chars | ||
description-max-length: | ||
level: warning | ||
length: 70 | ||
|
||
# Scope may be empty | ||
scope-empty: | ||
level: ignore | ||
|
||
# Subject line should exist | ||
subject-empty: | ||
level: error | ||
|
||
# Type must be one of these options | ||
type: | ||
level: error | ||
options: | ||
- fix | ||
- feat | ||
- chore | ||
- update | ||
- doc |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
rules: | ||
# Body may be empty | ||
body-empty: | ||
level: ignore | ||
|
||
# Description must not be empty | ||
description-empty: | ||
level: error | ||
|
||
# Description must start with a capital letter and must not end with a period or space | ||
description-format: | ||
level: error | ||
format: ^[A-Z0-9].*[^. ]$ | ||
|
||
# Description should be <70 chars | ||
description-max-length: | ||
level: warning | ||
length: 70 | ||
|
||
# Scope must be one of the following | ||
scope: | ||
level: error | ||
options: | ||
- export_schema | ||
- make_test_images | ||
- sdk | ||
|
||
# Scope may be empty | ||
# (NOTE: Disabled for now while we work around | ||
# https://github.com/KeisukeYamashita/commitlint-rs/issues/355.) | ||
# scope-empty: | ||
# level: ignore | ||
|
||
# Subject line should exist | ||
subject-empty: | ||
level: error | ||
|
||
# Type must be one of these options | ||
type: | ||
level: error | ||
options: | ||
- fix | ||
- feat | ||
- chore | ||
- update | ||
- doc |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
name: CI | ||
|
||
on: | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
push: | ||
branches: main | ||
branches: | ||
- main | ||
- nightly | ||
schedule: | ||
- cron: "0 18 * * 1,4,6" # 1800 UTC every Monday, Thursday, Saturday | ||
|
||
jobs: | ||
tests-cargo: | ||
tests: | ||
name: Unit tests | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
rust_version: [stable, 1.74.0] | ||
rust_version: [stable, 1.76.0] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
|
@@ -41,11 +48,11 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
target: [aarch64-unknown-linux-gnu] | ||
rust_version: [stable, 1.74.0] | ||
rust_version: [stable, 1.76.0] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
|
@@ -72,7 +79,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
@@ -95,12 +102,10 @@ jobs: | |
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: llvm-tools-preview | ||
|
||
- name: Cache Rust dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
@@ -120,7 +125,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
|
@@ -139,31 +144,25 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install clippy | ||
run: rustup component add clippy | ||
with: | ||
components: clippy | ||
|
||
- name: Cache Rust dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Cargo clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --all-targets -- -D warnings | ||
env: | ||
RUST_BACKTRACE: "1" | ||
- name: Run Clippy | ||
run: cargo clippy --all-features --all-targets -- -Dwarnings | ||
|
||
cargo_fmt: | ||
name: Enforce Rust code format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@nightly | ||
|
@@ -178,12 +177,12 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install nightly Rust toolchain | ||
# Nightly is used here because the docs.rs build | ||
# uses nightly and we use doc_cfg features that are | ||
# not in stable Rust as of this writing (Rust 1.62). | ||
# not in stable Rust as of this writing (Rust 1.76). | ||
uses: dtolnay/rust-toolchain@nightly | ||
|
||
- name: Run cargo docs | ||
|
@@ -212,10 +211,10 @@ jobs: | |
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Audit crate dependencies | ||
uses: EmbarkStudios/cargo-deny-action@v1 | ||
uses: EmbarkStudios/cargo-deny-action@v2 | ||
with: | ||
command: check ${{ matrix.checks }} | ||
|
||
|
@@ -224,7 +223,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@nightly | ||
|
@@ -234,53 +233,3 @@ jobs: | |
with: | ||
version: latest | ||
args: --all-targets --all-features | ||
|
||
version_bump: | ||
name: Ensure (MINOR) tag is used when making an API breaking change | ||
# Change all of these steps to (MAJOR) after 1.0 release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Get latest existing tag | ||
uses: WyriHaximus/github-action-get-previous-tag@v1 | ||
id: get-latest-tag | ||
|
||
- name: Set new version | ||
uses: paulhatch/[email protected] | ||
id: set-version | ||
with: | ||
tag_prefix: "v" | ||
version_format: "${major}.${minor}.${patch}" | ||
major_pattern: "(MAJOR)" | ||
minor_pattern: "(MINOR)" | ||
|
||
- name: Generate changelog since last tag | ||
run: | | ||
{ | ||
echo 'changelog<<EOF' | ||
git log --format="* %s" ${{ steps.get-latest-tag.outputs.tag }}..HEAD | { grep -v "(IGNORE)" || :; } | ||
echo EOF | ||
} >> "$GITHUB_OUTPUT" | ||
- name: "Bump crate version (NOTE: Not pushed back to repo!)" | ||
continue-on-error: true # If no change to crate version, ignore git commit error | ||
run: | | ||
sed -i "s/^version = \"[^\"]*\"$/version = \"$VERSION\"/;" sdk/Cargo.toml | ||
git config user.email "[email protected]" | ||
git config --global user.name "PR validation bot" | ||
git add . | ||
git commit -m "DO NOT PUSH BACK TO PR: Bump crate version" | ||
env: | ||
VERSION: ${{ steps.set-version.outputs.version }} | ||
|
||
- name: If this step fails, change title of the PR to include (MINOR) tag | ||
uses: obi1kenobi/cargo-semver-checks-action@v2 | ||
with: | ||
package: c2pa |
Oops, something went wrong.