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 8c8c4f9 commit c839063
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
50 changes: 25 additions & 25 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 @@ -454,7 +454,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: creditcoin-node-for-testing-ci
path: target/release
path: target/production

- name: Install Node.js
uses: actions/setup-node@v4
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 @@ -503,12 +503,12 @@ jobs:
uses: actions/download-artifact@v4
with:
name: creditcoin-node-for-testing-ci
path: target/release
path: target/production

- 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 @@ -717,7 +717,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: creditcoin-node-for-testing-ci
path: target/release
path: target/production

- name: Install Node.js
uses: actions/setup-node@v4
Expand All @@ -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 @@ -850,7 +850,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: creditcoin-node-for-testing-ci
path: target/release
path: target/production

- name: Install Node.js
uses: actions/setup-node@v4
Expand All @@ -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 @@ -907,7 +907,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: creditcoin-node-${{ matrix.chainspec }}
path: target/release
path: target/production

- name: Install Node.js
uses: actions/setup-node@v4
Expand All @@ -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 @@ -1038,7 +1038,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: creditcoin-node-for-testing-ci
path: target/release
path: target/production

- name: Install Node.js
uses: actions/setup-node@v4
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 c839063

Please sign in to comment.