Skip to content

Commit

Permalink
Merge branch 'main' into core-domain-bundle-solution-verification
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchengxu authored Nov 17, 2022
2 parents 70a10d8 + c080a1e commit a4ad260
Show file tree
Hide file tree
Showing 48 changed files with 974 additions and 383 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*
!/crates
!/cumulus
!/domains
!/orml
!/substrate
!/test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/chain-spec-snapshot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- name: Build node image
id: build
uses: docker/build-push-action@v2
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # @v3.2.0
with:
file: Dockerfile-node
push: false
Expand All @@ -32,7 +32,7 @@ jobs:
docker run --rm -u root ${{ steps.build.outputs.digest }} build-spec --chain gemini-2a-compiled --disable-default-bootnode --raw > chain-spec-raw-gemini-2a.json
- name: Upload chain specifications to artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # @v3.1.1
with:
name: chain-specifications
path: |
Expand All @@ -41,7 +41,7 @@ jobs:
if-no-files-found: error

- name: Upload chain specifications to assets
uses: alexellis/upload-assets@0.3.0
uses: alexellis/upload-assets@259de5111cb56966d046ced998941e93f91d2c93 # @0.4.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/runtime-snapshot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: Build runtime
id: build
uses: docker/build-push-action@v2
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # @v3.2.0
with:
file: Dockerfile-runtime
push: false
Expand All @@ -36,15 +36,15 @@ jobs:
echo "SPEC_VERSION=$SPEC_VERSION" >> $GITHUB_ENV
- name: Upload runtime to artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # @v3.1.1
with:
name: subspace_runtime
path: |
subspace_runtime-${{ env.SPEC_VERSION }}.compact.compressed.wasm
if-no-files-found: error

- name: Upload runtime to assets
uses: alexellis/upload-assets@0.3.0
uses: alexellis/upload-assets@259de5111cb56966d046ced998941e93f91d2c93 # @0.4.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand Down
71 changes: 18 additions & 53 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,23 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # @v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Rust toolchain
uses: actions-rs/toolchain@v1
# TODO: Below can be removed when https://github.com/actions-rs/toolchain/issues/126 is resolved
with:
toolchain: nightly-2022-11-08
target: wasm32-unknown-unknown
override: true
components: rustfmt, clippy

- name: Configure cache
uses: actions/cache@v2
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # @v3.0.11
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}

- name: cargo fmt
uses: actions-rs/cargo@v1
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
with:
command: fmt
args: --all -- --check
Expand All @@ -68,70 +59,53 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # @v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Rust toolchain
uses: actions-rs/toolchain@v1
# TODO: Below can be removed when https://github.com/actions-rs/toolchain/issues/126 is resolved
with:
toolchain: nightly-2022-11-08
target: wasm32-unknown-unknown
override: true
components: rustfmt, clippy

# Workaround to resolve link error with C:\msys64\mingw64\bin\libclang.dll
- name: Remove msys64
run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
if: runner.os == 'Windows'

- name: Configure cache
uses: actions/cache@v2
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # @v3.0.11
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}

- name: cargo clippy
uses: actions-rs/clippy-check@v1
uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # @v1.0.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets -- -D warnings
args: --locked --all-targets -- -D warnings

cargo-docs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # @v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Rust toolchain
uses: actions-rs/toolchain@v1
# TODO: Below can be removed when https://github.com/actions-rs/toolchain/issues/126 is resolved
with:
toolchain: nightly-2022-11-08
target: wasm32-unknown-unknown
override: true

- name: Configure cache
uses: actions/cache@v2
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # @v3.0.11
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}

- name: Check Documentation
run: cargo doc --all --no-deps --lib
run: cargo doc --locked --all --no-deps --lib
env:
RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links"

Expand All @@ -147,36 +121,27 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # @v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Rust toolchain
uses: actions-rs/toolchain@v1
# TODO: Below can be removed when https://github.com/actions-rs/toolchain/issues/126 is resolved
with:
toolchain: nightly-2022-11-08
target: wasm32-unknown-unknown
override: true
components: rustfmt, clippy

# Workaround to resolve link error with C:\msys64\mingw64\bin\libclang.dll
- name: Remove msys64
run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
if: runner.os == 'Windows'

- name: Configure cache
uses: actions/cache@v2
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # @v3.0.11
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}

- name: cargo test
uses: actions-rs/cargo@v1
- name: cargo test --locked
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
with:
command: test
23 changes: 5 additions & 18 deletions .github/workflows/rustdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,21 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # @v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-11-08
target: wasm32-unknown-unknown
profile: minimal
override: true
components: rustfmt, rust-src

# Build the rust crate docs
# Use `RUSTC_BOOTSTRAP` in order to use the `--enable-index-page` flag of rustdoc
# This is needed in order to generate a landing page `index.html` for workspaces
- name: Build Documentation
run: cargo doc --all --no-deps --lib
env:
RUSTC_BOOTSTRAP: 1
RUSTDOCFLAGS: "-Z unstable-options --enable-index-page"

- name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@releases/v3
uses: JamesIves/github-pages-deploy-action@ba1486788b0490a235422264426c45848eac35c6 # @v4.4.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: target/doc
branch: gh-pages
folder: target/doc
44 changes: 14 additions & 30 deletions .github/workflows/snapshot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ jobs:

steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # @v2.1.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # @v2.2.1

- name: Log into registry
uses: docker/login-action@v1
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # @v2.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # @v4.1.1
with:
images: |
ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}
Expand All @@ -67,7 +67,7 @@ jobs:
- name: Build and push ${{ matrix.image }} image
id: build
uses: docker/build-push-action@v2
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # @v3.2.0
with:
file: Dockerfile-${{ matrix.image }}${{ matrix.platform.dockerfile-suffix }}
platforms: ${{ matrix.platform.arch }}
Expand Down Expand Up @@ -109,29 +109,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # @v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Rust toolchain (${{ matrix.build.target }})
uses: actions-rs/toolchain@v1
# TODO: Below can be removed when https://github.com/actions-rs/toolchain/issues/126 is resolved
with:
toolchain: nightly-2022-11-08
target: ${{ matrix.build.target }}
components: rust-src
override: true

- name: Rust toolchain (wasm32)
uses: actions-rs/toolchain@v1
# TODO: Below can be removed when https://github.com/actions-rs/toolchain/issues/126 is resolved
with:
toolchain: nightly-2022-11-08
target: wasm32-unknown-unknown

# Workaround to resolve link error with C:\msys64\mingw64\bin\libclang.dll
- name: Remove msys64
run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
Expand All @@ -142,16 +126,16 @@ jobs:
if: matrix.build.target == 'aarch64-unknown-linux-gnu'

- name: Build farmer
uses: actions-rs/cargo@v1
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
with:
command: build
args: -Z build-std --target ${{ matrix.build.target }} --profile production --bin subspace-farmer
args: --locked -Z build-std --target ${{ matrix.build.target }} --profile production --bin subspace-farmer

- name: Build node
uses: actions-rs/cargo@v1
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
with:
command: build
args: -Z build-std --target ${{ matrix.build.target }} --profile production --bin subspace-node
args: --locked -Z build-std --target ${{ matrix.build.target }} --profile production --bin subspace-node

- name: Sign Application (macOS)
run: |
Expand Down Expand Up @@ -183,7 +167,7 @@ jobs:
if: runner.os == 'macOS'

- name: Sign Application (Windows)
uses: skymatic/code-sign-action@v1.1.0
uses: skymatic/code-sign-action@cfcc1c15b32938bab6dea25192045b6d2989e4d0 # @v1.1.0
with:
certificate: '${{ secrets.WINDOWS_CERTIFICATE }}'
password: '${{ secrets.WINDOWS_CERTIFICATE_PW }}'
Expand Down Expand Up @@ -220,15 +204,15 @@ jobs:
if: runner.os == 'Windows'

- name: Upload node and farmer executables to artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # @v3.1.1
with:
name: executables-${{ matrix.build.suffix }}
path: |
executables/*
if-no-files-found: error

- name: Upload node and farmer executables to assets
uses: alexellis/upload-assets@0.3.0
uses: alexellis/upload-assets@259de5111cb56966d046ced998941e93f91d2c93 # @0.4.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand Down
Loading

0 comments on commit a4ad260

Please sign in to comment.