-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CI and add a Release workflow
- Loading branch information
Showing
9 changed files
with
188 additions
and
43 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,10 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
informational: true | ||
patch: false | ||
|
||
comment: | ||
layout: "diff" | ||
require_changes: true |
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,15 @@ | ||
minVersion: "1.8.1" | ||
github: | ||
owner: getsentry | ||
repo: pdb | ||
changelogPolicy: auto | ||
|
||
statusProvider: | ||
name: github | ||
artifactProvider: | ||
name: none | ||
|
||
preReleaseCommand: bash scripts/bump-version.sh | ||
targets: | ||
- name: github | ||
- name: crates |
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,10 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
|
||
[Makefile] | ||
indent_style = tab |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Enforce License Compliance | ||
|
||
on: | ||
push: | ||
branches: [master, release/*] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
enforce-license-compliance: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Enforce License Compliance" | ||
uses: getsentry/action-enforce-license-compliance@main | ||
with: | ||
fossa_api_key: ${{ secrets.FOSSA_API_KEY }} |
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,30 @@ | ||
name: Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to release | ||
required: false | ||
force: | ||
description: Force a release even when there are release-blockers (optional) | ||
required: false | ||
merge_target: | ||
description: Target branch to merge into. Uses the default branch as a fallback (optional) | ||
required: false | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
name: "Release a new version" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Fetch all commits so we can determine previous version | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_RELEASE_PAT }} | ||
- name: Prepare release | ||
uses: getsentry/action-prepare-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }} | ||
with: | ||
version: ${{ github.event.inputs.version }} | ||
force: ${{ github.event.inputs.force }} |
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,31 @@ | ||
name: Weekly CI | ||
|
||
on: | ||
schedule: | ||
- cron: "14 3 * * 5" # every friday at 03:14 | ||
workflow_dispatch: | ||
|
||
env: | ||
RUSTFLAGS: -Dwarnings | ||
|
||
jobs: | ||
weekly-ci: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rust: [nightly, beta] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: | | ||
rustup toolchain install ${{ matrix.rust }} --profile minimal --component clippy --no-self-update | ||
rustup default ${{ matrix.rust }} | ||
- uses: arduino/setup-protoc@v3 | ||
|
||
- run: cargo clippy --all-features --workspace --tests --examples -- -D clippy::all | ||
- run: cargo test --workspace --all-features --all-targets | ||
- run: cargo test --workspace --all-features --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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
target | ||
*.iml | ||
.idea | ||
.DS_Store | ||
|
||
fixtures/symbol_server/* |
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,25 @@ | ||
#!/bin/bash | ||
set -eux | ||
|
||
if [ "$(uname -s)" != "Linux" ]; then | ||
echo "Please use the GitHub Action." | ||
exit 1 | ||
fi | ||
|
||
SCRIPT_DIR="$( dirname "$0" )" | ||
cd $SCRIPT_DIR/.. | ||
|
||
OLD_VERSION="${1}" | ||
NEW_VERSION="${2}" | ||
|
||
echo "Current version: $OLD_VERSION" | ||
echo "Bumping version: $NEW_VERSION" | ||
|
||
function replace() { | ||
! grep "$2" $3 | ||
perl -i -pe "s/$1/$2/g" $3 | ||
grep "$2" $3 # verify that replacement was successful | ||
} | ||
|
||
replace "^version = \"[0-9.]+\"" "version = \"$NEW_VERSION\"" Cargo.toml | ||
cargo metadata --format-version 1 > /dev/null # update `Cargo.lock` |