forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "CI - Disables Downstream Project actions (solana-labs#32983)"
This reverts commit 68456fa.
- Loading branch information
Showing
2 changed files
with
178 additions
and
0 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,24 @@ | ||
name: Downstream Project - SPL (Nightly) | ||
|
||
on: | ||
schedule: | ||
- cron: "0 3 * * *" | ||
|
||
jobs: | ||
main: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
branch: | ||
- master | ||
uses: ./.github/workflows/downstream-project-spl.yml | ||
with: | ||
branch: ${{ matrix.branch }} | ||
|
||
error_reporting: | ||
needs: | ||
- main | ||
if: failure() | ||
uses: ./.github/workflows/error-reporting.yml | ||
secrets: | ||
WEBHOOK: ${{ secrets.SLACK_ERROR_REPORTING_WEBHOOK }} |
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,154 @@ | ||
name: Downstream Project - SPL | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- v[0-9]+.[0-9]+ | ||
pull_request: | ||
branches: | ||
- master | ||
- v[0-9]+.[0-9]+ | ||
paths: | ||
- "**.rs" | ||
- "Cargo.toml" | ||
- "Cargo.lock" | ||
- "cargo-build-bpf" | ||
- "cargo-test-bpf" | ||
- "cargo-build-sbf" | ||
- "cargo-test-sbf" | ||
- "ci/downstream-projects/run-spl.sh" | ||
- ".github/workflows/downstream-project-spl.yml" | ||
workflow_call: | ||
inputs: | ||
branch: | ||
required: false | ||
type: string | ||
default: "master" | ||
|
||
env: | ||
SHELL: /bin/bash | ||
SCCACHE_GHA_ENABLED: "true" | ||
RUSTC_WRAPPER: "sccache" | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- shell: bash | ||
run: | | ||
.github/scripts/purge-ubuntu-runner.sh | ||
- uses: mozilla-actions/sccache-action@v0.0.3 | ||
|
||
- shell: bash | ||
run: | | ||
source .github/scripts/downstream-project-spl-common.sh | ||
sudo apt update | ||
sudo apt install libudev-dev binutils-dev libunwind-dev protobuf-compiler -y | ||
cargo check | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arrays: | ||
[ | ||
{ | ||
test_paths: ["token/cli"], | ||
required_programs: | ||
[ | ||
"token/program", | ||
"token/program-2022", | ||
"associated-token-account/program", | ||
], | ||
}, | ||
{ | ||
test_paths: ["single-pool/cli"], | ||
required_programs: | ||
[ | ||
"single-pool/program", | ||
], | ||
}, | ||
{ | ||
test_paths: ["token-upgrade/cli"], | ||
required_programs: | ||
[ | ||
"token-upgrade/program", | ||
], | ||
}, | ||
] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- shell: bash | ||
run: | | ||
.github/scripts/purge-ubuntu-runner.sh | ||
- uses: mozilla-actions/sccache-action@v0.0.3 | ||
|
||
- shell: bash | ||
run: | | ||
source .github/scripts/downstream-project-spl-common.sh | ||
sudo apt update | ||
sudo apt install libudev-dev binutils-dev libunwind-dev protobuf-compiler -y | ||
programStr="${{ tojson(matrix.arrays.required_programs) }}" | ||
IFS=', ' read -ra programs <<<"${programStr//[\[\]$'\n'$'\r' ]/}" | ||
for program in "${programs[@]}"; do | ||
$CARGO_BUILD_SBF --manifest-path "$program"/Cargo.toml | ||
done | ||
testPathsStr="${{ tojson(matrix.arrays.test_paths) }}" | ||
IFS=', ' read -ra test_paths <<<"${testPathsStr//[\[\]$'\n'$'\r' ]/}" | ||
for test_path in "${test_paths[@]}"; do | ||
cargo test --manifest-path "$test_path"/Cargo.toml | ||
done | ||
cargo-test-sbf: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
programs: | ||
- [token/program] | ||
- [ | ||
instruction-padding/program, | ||
token/program-2022, | ||
token/program-2022-test, | ||
] | ||
- [ | ||
associated-token-account/program, | ||
associated-token-account/program-test, | ||
] | ||
- [token-upgrade/program] | ||
- [feature-proposal/program] | ||
- [governance/addin-mock/program, governance/program] | ||
- [memo/program] | ||
- [name-service/program] | ||
- [stake-pool/program] | ||
- [single-pool/program] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- shell: bash | ||
run: | | ||
.github/scripts/purge-ubuntu-runner.sh | ||
- uses: mozilla-actions/sccache-action@v0.0.3 | ||
|
||
- shell: bash | ||
run: | | ||
source .github/scripts/downstream-project-spl-common.sh | ||
programStr="${{ tojson(matrix.programs) }}" | ||
IFS=', ' read -ra programs <<<"${programStr//[\[\]$'\n'$'\r' ]/}" | ||
for program in "${programs[@]}"; do | ||
$CARGO_TEST_SBF --manifest-path "$program"/Cargo.toml | ||
done |