Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into release-centrifuge_10…
Browse files Browse the repository at this point in the history
…24-client_1035
  • Loading branch information
mustermeiszer committed Dec 1, 2023
2 parents 205024a + 4c9d5f7 commit 5299da0
Show file tree
Hide file tree
Showing 65 changed files with 4,449 additions and 2,064 deletions.
5 changes: 3 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
**/target/
.github/
!scripts/install_toolchain.sh
docker-compos
.gitignore
docker
README.md
!docker/scripts
README.md
flake*
14 changes: 11 additions & 3 deletions .github/actions/prep-ubuntu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,20 @@ runs:
shell: sh
run: scripts/install_toolchain.sh

- name: Disable cache on forks and dependabot
if: github.event_name == 'pull_request'
shell: sh
run: |
if [ "${{ github.event.pull_request.head.repo.fork }}" == "true" ] || \
[ "${{ github.actor }}" == "dependabot[bot]" ] || \
[ "${{ github.actor }}" == "dependabot-preview[bot]" ]; then
echo "disable_cache=true" >> $GITHUB_ENV
fi
- name: SCcache setup
if: ${{ inputs.cache == 'enabled' }}
if: ${{ inputs.cache == 'enabled' && !env.disable_cache }}
uses: ./.github/actions/sccache-gcloud
with:
GWIP: ${{ inputs.GWIP }}
GSA: ${{ inputs.GSA }}



2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "monthly"
30 changes: 8 additions & 22 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ jobs:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4
with:
fetch-depth: 0
- name: Free space
# https://github.com/actions/runner-images/issues/2840#issuecomment-1284059930
run: |
sudo rm -rf /usr/share/dotnet
# sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: check available docker space
run: |
docker volume ls
df -h
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 #v3
- name: DockerHub Login
Expand All @@ -49,17 +37,15 @@ jobs:
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 #v5
with:
images: centrifugeio/centrifuge-chain
flavor: |
suffix=-${{ env.NOW }}
prefix=${{ matrix.target == 'test' && 'test-' || 'latest=auto' }}
tags: |
type=raw,event=branch,value={{branch}}-{{sha}}
type=semver,pattern={{raw}},suffix=,prefix=${{ matrix.target == 'test' && 'test-' || 'latest=auto' }}
type=semver,pattern={{major}},prefix=${{ matrix.target == 'test' && 'test-' || '' }},suffix=
type=edge
type=semver,pattern={{raw}},prefix=${{ matrix.target == 'test' && 'test-' || '' }}
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
type=ref,event=tag,suffix=-{{sha}}-${{ env.NOW }},prefix=${{ matrix.target == 'test' && 'test-' || '' }}
type=ref,event=pr,suffix=-{{sha}}-${{ env.NOW }},prefix=${{ matrix.target == 'test' && 'test-' || '' }}PR
type=ref,event=branch,prefix=${{ matrix.target == 'test' && 'test-' || '' }},suffix=-{{sha}}-${{ env.NOW }}
- name: Configure GHA cache
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 #v6
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
Expand All @@ -72,7 +58,7 @@ jobs:
file: ./docker/centrifuge-chain/Dockerfile
build-args: |
FEATURES=${{ matrix.target == 'test' && 'fast-runtime' || '' }}
push: ${{ github.event_name == 'pull_request' && false || true }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
# Cache options:
# https://docs.docker.com/build/ci/github-actions/cache/
Expand All @@ -96,4 +82,4 @@ jobs:
name: Check available space after build failed
run: |
docker volume ls
df -h
df -h
7 changes: 4 additions & 3 deletions .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
package: [altair-runtime, centrifuge-runtime, development-runtime]
name: ${{ matrix.target }}-${{ matrix.package }}
steps:
# PREP
# PREP
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #3.5.2

Expand Down Expand Up @@ -72,10 +72,11 @@ jobs:
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
with:
name: srtool-wasm-report.txt
path: ./${{ matrix.package }}-srtool-wasm-report.json
path: ./${{ matrix.package }}-srtool-wasm-report.json

- id: 'auth'
uses: 'google-github-actions/auth@f105ef0cdb3b102a020be1767fcc8a974898b7c6' # v1.2.0
if: github.event_name != 'pull_request'
uses: 'google-github-actions/auth@67e9c72af6e0492df856527b474995862b7b6591' # v2.0.0
with:
workload_identity_provider: ${{ secrets.GWIP_ARTIFACTS }}
service_account: ${{ secrets.GSA_ARTIFACTS }}
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/docs.yml → .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Rustdoc
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
cancel-in-progress: true
Expand All @@ -11,7 +10,12 @@ jobs:
permissions:
contents: read
id-token: write
pages: write
runs-on: ubuntu-latest-4-cores
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4
Expand Down Expand Up @@ -41,22 +45,21 @@ jobs:
run: |
echo "<meta http-equiv=\"refresh\" content=\"0; url=centrifuge_chain/index.html\">" \ > ./target/doc/index.html
- name: Setup Pages
uses: actions/configure-pages@v3

- name: Fix permissions
run: |
chmod -c -R +rX "./target/doc" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: upload Docs files
uses: actions/upload-pages-artifact@v2
with:
path: ./target/doc

deploy-docs:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
pages: write # to deploy to Pages
id-token: write
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy Docs
# if: github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v2
6 changes: 3 additions & 3 deletions .github/workflows/sanity-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
target: [test-general, test-integration,
lint-fmt, lint-clippy, cargo-build] # ,lint-taplo]
lint-fmt, lint-clippy, cargo-build, docs-build] # ,lint-taplo]
steps:
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #3.5.2
Expand All @@ -31,7 +31,7 @@ jobs:
run: ./ci/run-check.sh
env:
TARGET: ${{ matrix.target }}
RUSTC_WRAPPER: "sccache"
RUSTC_WRAPPER: "sccache"

benchmark-check:
name: bench-check-${{ matrix.runtime }}
Expand All @@ -55,4 +55,4 @@ jobs:
env:
TARGET: benchmark-check
RUNTIME: ${{ matrix.runtime }}
RUSTC_WRAPPER: "sccache"
RUSTC_WRAPPER: "sccache"
Loading

0 comments on commit 5299da0

Please sign in to comment.