|
@@ -1,4 +1,4 @@
|
|
|
-name: CI
|
|
|
+name: Rust
|
|
|
|
|
|
on:
|
|
|
push:
|
|
@@ -127,64 +127,6 @@ jobs:
|
|
|
run: |
|
|
|
cargo build --target ${{ matrix.TARGET }} --verbose -p sbi-testing --features "log"
|
|
|
|
|
|
- check-changelog:
|
|
|
- name: Check if `CHANGELOG.md` is updated
|
|
|
- runs-on: ubuntu-latest
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@v4
|
|
|
- - name: Get latest updated files
|
|
|
- run: |
|
|
|
- updated_files=$(git show --name-only --pretty=format: HEAD)
|
|
|
- - name: Check if changlog is updated
|
|
|
- run: |
|
|
|
- if git show --name-only --pretty=format: HEAD | grep -q "CHANGELOG.md"; then
|
|
|
- echo "Main CHANGELOG.md changed in the latest commit."
|
|
|
- else
|
|
|
- echo "Main CHANGELOG.md is not changed in the latest commit."
|
|
|
- exit 1
|
|
|
- fi
|
|
|
- for file in $updated_files; do
|
|
|
- first_path=$(dirname "$file")
|
|
|
- if [[ "$first_path" == *"sbi-rt"* ]]; then
|
|
|
- file_path = "./sbi-rt"
|
|
|
- elif [[ "$first_path" == *"sbi-spec"* ]]; then
|
|
|
- file_path = "./sbi-spec"
|
|
|
- elif [[ "$first_path" == *"sbi-testing"* ]]; then
|
|
|
- file_path = "./sbi-testing"
|
|
|
- else
|
|
|
- file_path = "./"
|
|
|
- fi
|
|
|
- changelog_path="$file_path/CHANGELOG.md"
|
|
|
- # Check if changelog is updated
|
|
|
- if git diff --name-only "$file_path" | grep -q "CHANGELOG.md"; then
|
|
|
- echo "File $changelog_path changed in the latest commit."
|
|
|
- else
|
|
|
- echo "File $changelog_path is not changed in the latest commit."
|
|
|
- exit 1
|
|
|
- fi
|
|
|
- done
|
|
|
-
|
|
|
- check-commit-signatures:
|
|
|
- name: Check commit signatures
|
|
|
- runs-on: ubuntu-latest
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@v4
|
|
|
- - name: Check if commit is signed
|
|
|
- run: |
|
|
|
- COMMIT=$(git log -1)
|
|
|
- if echo "$COMMIT" | grep -q "Author: "; then
|
|
|
- echo "Commit is signed."
|
|
|
- else
|
|
|
- echo "Commit is NOT signed."
|
|
|
- exit 1
|
|
|
- fi
|
|
|
- - name: Print author's information
|
|
|
- run: |
|
|
|
- AUTHOR_NAME=$(git log -1 --format='%an')
|
|
|
- AUTHOR_EMAIL=$(git log -1 --format='%ae')
|
|
|
- echo "Author's name: $AUTHOR_NAME"
|
|
|
- echo "Author's email: $AUTHOR_EMAIL"
|
|
|
-
|
|
|
# sbi-testing:
|
|
|
# name: Run rust-clippy analyzing
|
|
|
# runs-on: ubuntu-latest
|