feat: Expose the project canister ID table to sync plugins #2582
This file contains hidden or 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
| name: checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| src: ${{ steps.filter.outputs.src }} | |
| permissions: | |
| pull-requests: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 | |
| id: filter | |
| with: | |
| # With 'every', a changed file is matched only when it satisfies | |
| # ALL rules: the positive pattern AND every negated pattern. | |
| predicate-quantifier: 'every' | |
| filters: | | |
| src: | |
| - '**' | |
| - '!**.md' | |
| - '!docs-site/**' | |
| - '!npm/**' | |
| compile: | |
| name: compile:required | |
| needs: changes | |
| if: needs.changes.outputs.src == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup image (Linux) | |
| run: ./.github/scripts/provision-linux-build.sh | |
| # rust-cache hashes all installed toolchains; the runner image's `stable` | |
| # drifts as the image updates, which moves the cache key and causes misses. | |
| # Remove it so only the rust-toolchain.toml-pinned version remains. | |
| - name: Remove the runner's bundled Rust toolchain | |
| run: rustup toolchain remove stable 2>/dev/null || true | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache-shared-key: ${{ runner.os }}-checks | |
| cache-bin: false | |
| - name: build | |
| run: cargo build | |
| env: | |
| RUST_BACKTRACE: 1 | |
| lint: | |
| name: lint:required | |
| needs: [changes, compile] | |
| if: needs.changes.outputs.src == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup image (Linux) | |
| run: ./.github/scripts/provision-linux-build.sh | |
| # rust-cache hashes all installed toolchains; the runner image's `stable` | |
| # drifts as the image updates, which moves the cache key and causes misses. | |
| # Remove it so only the rust-toolchain.toml-pinned version remains. | |
| - name: Remove the runner's bundled Rust toolchain | |
| run: rustup toolchain remove stable 2>/dev/null || true | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache-shared-key: ${{ runner.os }}-checks | |
| cache-bin: false | |
| - name: Run Lint | |
| run: cargo clippy --tests --benches -- -D warnings | |
| env: | |
| RUST_BACKTRACE: 1 | |
| format: | |
| name: fmt:required | |
| needs: [changes, compile] | |
| if: needs.changes.outputs.src == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup image (Linux) | |
| run: ./.github/scripts/provision-linux-build.sh | |
| # rust-cache hashes all installed toolchains; the runner image's `stable` | |
| # drifts as the image updates, which moves the cache key and causes misses. | |
| # Remove it so only the rust-toolchain.toml-pinned version remains. | |
| - name: Remove the runner's bundled Rust toolchain | |
| run: rustup toolchain remove stable 2>/dev/null || true | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache-shared-key: ${{ runner.os }}-checks | |
| cache-bin: false | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| toml-format: | |
| name: toml-fmt:required | |
| needs: changes | |
| if: needs.changes.outputs.src == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install taplo | |
| run: | | |
| curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-linux-x86_64.gz \ | |
| | gunzip -c > taplo | |
| chmod +x taplo | |
| sudo mv taplo /usr/local/bin/taplo | |
| - name: Check TOML formatting | |
| run: taplo fmt --check | |
| # | |
| # Runs a series of checks to make sure that all the docs | |
| # that need to be generated have been genrated an are up | |
| # to date. | |
| # | |
| cli-ref: | |
| # | |
| # generate the CLI reference file and check if it is up to date | |
| # | |
| name: cli-ref:required | |
| needs: [changes, compile] | |
| if: needs.changes.outputs.src == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup image (Linux) | |
| run: ./.github/scripts/provision-linux-build.sh | |
| # rust-cache hashes all installed toolchains; the runner image's `stable` | |
| # drifts as the image updates, which moves the cache key and causes misses. | |
| # Remove it so only the rust-toolchain.toml-pinned version remains. | |
| - name: Remove the runner's bundled Rust toolchain | |
| run: rustup toolchain remove stable 2>/dev/null || true | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache-shared-key: ${{ runner.os }}-checks | |
| cache-bin: false | |
| - name: generate docs | |
| run: ./scripts/generate-cli-docs.sh | |
| - name: Check for uncommitted changes | |
| run: | | |
| if [[ -n "$(git status --porcelain)" ]]; then | |
| echo "❌ The cli-reference documentation is not up to date" | |
| echo "" | |
| echo " Run ./scripts/generate-cli-docs.sh to update them" | |
| echo "" | |
| git status --porcelain | |
| exit 1 | |
| else | |
| echo "✅ Git state is clean." | |
| fi | |
| icp-yaml-schema: | |
| # | |
| # generate config schemas and check if they are up to date | |
| # | |
| name: icp-yaml-schema:required | |
| needs: [changes, compile] | |
| if: needs.changes.outputs.src == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup image (Linux) | |
| run: ./.github/scripts/provision-linux-build.sh | |
| # rust-cache hashes all installed toolchains; the runner image's `stable` | |
| # drifts as the image updates, which moves the cache key and causes misses. | |
| # Remove it so only the rust-toolchain.toml-pinned version remains. | |
| - name: Remove the runner's bundled Rust toolchain | |
| run: rustup toolchain remove stable 2>/dev/null || true | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache-shared-key: ${{ runner.os }}-checks | |
| cache-bin: false | |
| - name: generate schemas | |
| run: ./scripts/generate-config-schemas.sh | |
| - name: Check for uncommitted changes | |
| run: | | |
| if [[ -n "$(git status --porcelain)" ]]; then | |
| echo "❌ The schema docs are not up to date" | |
| echo "" | |
| echo " Run ./scripts/generate-config-schemas.sh to update them" | |
| echo "" | |
| git status --porcelain | |
| exit 1 | |
| else | |
| echo "✅ Git state is clean." | |
| fi |