Skip to content

Commit

Permalink
remove ci compilation profile and optimize dev-release profiles
Browse files Browse the repository at this point in the history
Signed-off-by: ozkanonur <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Apr 18, 2023
1 parent ef753cd commit 9754424
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 22 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --bin mm2 --profile ci
cargo build --bin mm2 --release
- name: Compress build output
env:
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo build --bin mm2 --profile ci --target x86_64-apple-darwin
cargo build --bin mm2 --release --target x86_64-apple-darwin
- name: Compress build output
env:
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
remove-item "./MM_VERSION"
}
echo $Env:COMMIT_HASH > ./MM_VERSION
cargo build --bin mm2 --profile ci
cargo build --bin mm2 --release
- name: Compress build output
env:
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo rustc --target x86_64-apple-darwin --lib --profile ci --package mm2_bin_lib --crate-type=staticlib
cargo rustc --target x86_64-apple-darwin --lib --release --package mm2_bin_lib --crate-type=staticlib
- name: Compress build output
env:
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
wasm-pack build mm2src/mm2_bin_lib --target web --out-dir ../../target/target-wasm-release
wasm-pack build --release mm2src/mm2_bin_lib --target web --out-dir ../../target/target-wasm-release
- name: Compress build output
env:
Expand Down Expand Up @@ -309,7 +309,7 @@ jobs:
run: |
rm -f ./MM_VERSION
echo $COMMIT_HASH > ./MM_VERSION
cargo rustc --target aarch64-apple-ios --lib --profile ci --package mm2_bin_lib --crate-type=staticlib
cargo rustc --target aarch64-apple-ios --lib --release --package mm2_bin_lib --crate-type=staticlib
- name: Compress build output
env:
Expand Down Expand Up @@ -372,7 +372,7 @@ jobs:
echo $COMMIT_HASH > ./MM_VERSION
export PATH=$PATH:/android-ndk/bin
CC_aarch64_linux_android=aarch64-linux-android21-clang CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang cargo rustc --target=aarch64-linux-android --lib --profile ci --crate-type=staticlib --package mm2_bin_lib
CC_aarch64_linux_android=aarch64-linux-android21-clang CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang cargo rustc --target=aarch64-linux-android --lib --release --crate-type=staticlib --package mm2_bin_lib
- name: Compress build output
env:
Expand Down Expand Up @@ -435,7 +435,7 @@ jobs:
echo $COMMIT_HASH > ./MM_VERSION
export PATH=$PATH:/android-ndk/bin
CC_armv7_linux_androideabi=armv7a-linux-androideabi21-clang CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi21-clang cargo rustc --target=armv7-linux-androideabi --lib --profile ci --crate-type=staticlib --package mm2_bin_lib
CC_armv7_linux_androideabi=armv7a-linux-androideabi21-clang CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi21-clang cargo rustc --target=armv7-linux-androideabi --lib --release --crate-type=staticlib --package mm2_bin_lib
- name: Compress build output
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fmt-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: cargo fmt -- --check

- name: x86-64 code lint
run: cargo clippy --all-targets --profile ci -- --D warnings
run: cargo clippy --all-targets -- --D warnings

wasm-lint:
timeout-minutes: 45
Expand All @@ -37,4 +37,4 @@ jobs:
rustup target add wasm32-unknown-unknown
- name: wasm code lint
run: cargo clippy --target wasm32-unknown-unknown --profile ci -- --D warnings
run: cargo clippy --target wasm32-unknown-unknown -- --D warnings
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Test
run: |
# wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.sh | bash
cargo test --bins --lib --profile ci
cargo test --bins --lib
mac-x86-64-unit:
timeout-minutes: 90
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Test
run: |
# wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.sh | bash
cargo test --bins --lib --target x86_64-apple-darwin --profile ci
cargo test --bins --lib --target x86_64-apple-darwin
win-x86-64-unit:
timeout-minutes: 90
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
# Restart-Service docker
# Get-Service docker
cargo test --bins --lib --profile ci
cargo test --bins --lib
linux-x86-64-mm2-integration:
timeout-minutes: 90
Expand All @@ -105,7 +105,7 @@ jobs:
rustup default nightly-2022-10-29
- name: Test
run: cargo test --test 'mm2_tests_main' --profile ci
run: cargo test --test 'mm2_tests_main'

# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits
# https://github.com/KomodoPlatform/atomicDEX-API/actions/runs/4419618128/jobs/7748266141#step:4:1790
Expand All @@ -127,7 +127,7 @@ jobs:
# rustup target add x86_64-apple-darwin

# - name: Test
# run: cargo test --test 'mm2_tests_main' --target x86_64-apple-darwin --profile ci
# run: cargo test --test 'mm2_tests_main' --target x86_64-apple-darwin

win-x86-64-mm2-integration:
timeout-minutes: 90
Expand All @@ -146,7 +146,7 @@ jobs:
rustup default nightly-2022-10-29
- name: Test
run: cargo test --test 'mm2_tests_main' --profile ci
run: cargo test --test 'mm2_tests_main'

docker-tests:
timeout-minutes: 90
Expand All @@ -167,7 +167,7 @@ jobs:
- name: Test
run: |
wget -O - https://raw.githubusercontent.com/KomodoPlatform/komodo/master/zcutil/fetch-params-alt.sh | bash
cargo test --test 'docker_tests_main' --features run-docker-tests --profile ci
cargo test --test 'docker_tests_main' --features run-docker-tests
wasm:
timeout-minutes: 90
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

**Enhancements/Fixes:**
- An issue was fixed where we don't have to wait for all EVM nodes to sync the latest account nonce [#1757](https://github.com/KomodoPlatform/atomicDEX-API/pull/1757)
- optimized dev and release compilation profiles and removed ci [#1759](https://github.com/KomodoPlatform/atomicDEX-API/pull/1759)

## v1.0.2-beta - 2023-04-11

Expand Down
19 changes: 14 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ debug-assertions = false
# For some reason, opt-level 3 started causing infinite Windows builds after Cosmos integration
# TODO troubleshoot it
opt-level = 2
strip = true
lto = true
panic = "abort"
codegen-units = 1

[profile.test]
# required to avoid a long running process of librustcash additional chain validation that is enabled with debug assertions
Expand All @@ -63,8 +67,13 @@ debug-assertions = false
# Turns debugging symbols off for the out-of-workspace dependencies.
debug = false

[profile.ci]
inherits = "dev"
# full debug info is not required
debug = 1
debug-assertions = false
[profile.dev]
opt-level = 0
debug = true
debug-assertions = true
overflow-checks = true
lto = false
panic = 'unwind'
incremental = true
codegen-units = 256
rpath = false

0 comments on commit 9754424

Please sign in to comment.