Skip to content

Commit

Permalink
Always build & test with --profile=production
Browse files Browse the repository at this point in the history
otherwise we can't really be certain that the binaries we'll ship
actually compile and work!
  • Loading branch information
atodorov committed Aug 8, 2024
1 parent 094e6fb commit d75e61a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ jobs:

- name: Check Build
run: |
SKIP_WASM_BUILD=1 cargo check --release
SKIP_WASM_BUILD=1 cargo check --profile=production
- name: Check Build for Benchmarking
run: |
SKIP_WASM_BUILD=1 cargo check --features=runtime-benchmarks --release
SKIP_WASM_BUILD=1 cargo check --features=runtime-benchmarks --profile=production
unit-test-creditcoin:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -367,19 +367,19 @@ jobs:
uses: gluwa/cargo@dev
with:
command: build
args: --release ${{ steps.compiler-flags.outputs.extra }}
args: --profile=production ${{ steps.compiler-flags.outputs.extra }}

- name: Upload creditcoin-node binary
uses: actions/upload-artifact@v4
with:
name: creditcoin-node-${{ matrix.target }}
path: target/release/creditcoin3-node
path: target/production/creditcoin3-node

- name: Upload WASM runtime
uses: actions/upload-artifact@v4
with:
name: creditcoin_node_runtime.compact.compressed.wasm-${{ matrix.target }}
path: target/release/wbuild/creditcoin3-runtime/creditcoin_next_runtime.compact.compressed.wasm
path: target/production/wbuild/creditcoin3-runtime/creditcoin_next_runtime.compact.compressed.wasm

build-creditcoin-node-for-testing:
needs:
Expand Down Expand Up @@ -429,19 +429,19 @@ jobs:
uses: gluwa/cargo@dev
with:
command: build
args: --release --features=fast-runtime ${{ steps.compiler-flags.outputs.extra }}
args: --profile=production --features=fast-runtime ${{ steps.compiler-flags.outputs.extra }}

- name: Upload creditcoin-node binary
uses: actions/upload-artifact@v4
with:
name: creditcoin-node-for-testing-${{ matrix.target }}
path: target/release/creditcoin3-node
path: target/production/creditcoin3-node

- name: Upload WASM runtime
uses: actions/upload-artifact@v4
with:
name: creditcoin_node_runtime.compact.compressed.wasm-for-${{ matrix.target }}
path: target/release/wbuild/creditcoin3-runtime/creditcoin_next_runtime.compact.compressed.wasm
path: target/production/wbuild/creditcoin3-runtime/creditcoin_next_runtime.compact.compressed.wasm

integration-test-smart-contract:
needs:
Expand All @@ -463,8 +463,8 @@ jobs:

- name: Start Node 1 - Alice
run: |
chmod a+x ./target/release/creditcoin3-node
./target/release/creditcoin3-node \
chmod a+x ./target/production/creditcoin3-node
./target/production/creditcoin3-node \
--dev --validator --pruning archive \
--node-key d182d503b7dd97e7c055f33438c7717145840fd66b2a055284ee8d768241a463 \
--base-path ./alice-data &
Expand Down Expand Up @@ -508,7 +508,7 @@ jobs:
- name: Run Extrinsics Ordering
shell: bash
run: |
chmod a+x ./target/release/creditcoin3-node
chmod a+x ./target/production/creditcoin3-node
./.github/check-extrinsics.sh
env:
GITHUB_TOKEN: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -727,8 +727,8 @@ jobs:

- name: Start creditcoin3-node in order to update typedefs
run: |
chmod a+x ./target/release/creditcoin3-node
./target/release/creditcoin3-node \
chmod a+x ./target/production/creditcoin3-node
./target/production/creditcoin3-node \
--chain dev \
--validator --alice --pruning archive \
--node-key d182d503b7dd97e7c055f33438c7717145840fd66b2a055284ee8d768241a463 \
Expand Down Expand Up @@ -860,8 +860,8 @@ jobs:

- name: Start Node 1
run: |
chmod a+x ./target/release/creditcoin3-node
./target/release/creditcoin3-node \
chmod a+x ./target/production/creditcoin3-node
./target/production/creditcoin3-node \
--chain dev \
--validator --alice --pruning archive \
--node-key d182d503b7dd97e7c055f33438c7717145840fd66b2a055284ee8d768241a463 \
Expand Down Expand Up @@ -917,8 +917,8 @@ jobs:

- name: Start Node 1
run: |
chmod a+x ./target/release/creditcoin3-node
./target/release/creditcoin3-node \
chmod a+x ./target/production/creditcoin3-node
./target/production/creditcoin3-node \
--chain ${{ matrix.chainspec }} \
--validator --alice --pruning archive \
--node-key d182d503b7dd97e7c055f33438c7717145840fd66b2a055284ee8d768241a463 \
Expand Down Expand Up @@ -1082,8 +1082,8 @@ jobs:
- name: Start Creditcoin Node 1 - Alice
run: |
chmod a+x ./target/release/creditcoin3-node
./target/release/creditcoin3-node \
chmod a+x ./target/production/creditcoin3-node
./target/production/creditcoin3-node \
--dev --validator --pruning archive \
--node-key d182d503b7dd97e7c055f33438c7717145840fd66b2a055284ee8d768241a463 \
--base-path ./alice-data &
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/runtime-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,19 @@ jobs:
uses: gluwa/cargo@dev
with:
command: build
args: --release
args: --profile=production

- name: Upload creditcoin3-node binary
uses: actions/upload-artifact@v4
with:
name: creditcoin3-node
path: target/release/creditcoin3-node
path: target/production/creditcoin3-node

- name: Upload WASM runtime
uses: actions/upload-artifact@v4
with:
name: creditcoin3_runtime.compact.compressed.wasm
path: target/release/wbuild/creditcoin3-runtime/creditcoin3_runtime.compact.compressed.wasm
path: target/production/wbuild/creditcoin3-runtime/creditcoin3_runtime.compact.compressed.wasm

setup-self-hosted:
needs:
Expand Down Expand Up @@ -332,10 +332,10 @@ jobs:

- name: Start a local creditcoin3-node from the fork
run: |
chmod a+x ./target/release/creditcoin3-node
chmod a+x ./target/production/creditcoin3-node
./target/release/creditcoin3-node --version
./target/release/creditcoin3-node --chain ./creditcoin-fork.json --validator --alice --pruning archive \
./target/production/creditcoin3-node --version
./target/production/creditcoin3-node --chain ./creditcoin-fork.json --validator --alice --pruning archive \
--base-path /mnt >creditcoin3-node-with-forked-chain.log 2>&1 &
- name: Wait for blockchain to start
Expand Down Expand Up @@ -447,12 +447,12 @@ jobs:

- name: Start a disconnected creditcoin3-node
run: |
chmod a+x ./target/release/creditcoin3-node
./target/release/creditcoin3-node --version
chmod a+x ./target/production/creditcoin3-node
./target/production/creditcoin3-node --version
# WARNING: using different port b/c the network remembers there was a node
# at this address previously. We don't want to be connected to the chain !!!
./target/release/creditcoin3-node \
./target/production/creditcoin3-node \
--port 44444 \
--name "test-node-disconnected-$GITHUB_RUN_ID-attempt-$GITHUB_RUN_ATTEMPT" \
--chain ${{ needs.setup.outputs.target_chain }} \
Expand Down

0 comments on commit d75e61a

Please sign in to comment.