Skip to content

Commit

Permalink
Merge pull request #1871 from KomodoPlatform/dev
Browse files Browse the repository at this point in the history
chore(release): v1.0.6-beta
  • Loading branch information
shamardy authored Jul 24, 2023
2 parents 1d8bebd + e0b25a4 commit ef89614
Show file tree
Hide file tree
Showing 160 changed files with 10,130 additions and 2,785 deletions.
20 changes: 20 additions & 0 deletions .github/actions/cargo-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Set up cargo cache'
description: 'Sets up the cargo cache for the workflow'
runs:
using: 'composite'
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
17 changes: 13 additions & 4 deletions .github/workflows/adex-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand All @@ -33,6 +33,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Start checking code format and lint
run: |
cargo fmt --manifest-path ./mm2src/adex_cli/Cargo.toml --all -- --check
Expand All @@ -49,7 +52,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand All @@ -62,9 +65,12 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Start testing
run: |
cargo test --manifest-path ./mm2src/adex_cli/Cargo.toml
cargo test --manifest-path ./mm2src/adex_cli/Cargo.toml --no-fail-fast
build:
timeout-minutes: 60
Expand All @@ -77,7 +83,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand All @@ -90,6 +96,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Start building
run: |
cargo build --manifest-path ./mm2src/adex_cli/Cargo.toml
34 changes: 29 additions & 5 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand All @@ -41,6 +41,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -100,6 +103,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -147,6 +153,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $Env:GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
if (test-path "./MM_VERSION") {
Expand Down Expand Up @@ -196,6 +205,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -235,7 +247,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand All @@ -257,6 +269,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -305,6 +320,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -344,7 +362,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand All @@ -366,6 +384,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -407,7 +428,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand All @@ -429,6 +450,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -472,7 +496,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/fmt-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
sudo apt-get -y install libudev-dev
if: matrix.os == 'ubuntu-latest'

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: fmt check
run: cargo fmt -- --check

Expand All @@ -42,5 +45,8 @@ jobs:
rustup default nightly-2022-10-29
rustup target add wasm32-unknown-unknown
- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: wasm code lint
run: cargo clippy --target wasm32-unknown-unknown -- --D warnings
15 changes: 14 additions & 1 deletion .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ on:
types:
- opened
- edited
- reopened
- synchronize
- labeled
- unlabeled

jobs:
main:
name: Validate PR title
name: Validate PR
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.2.0
Expand Down Expand Up @@ -40,3 +43,13 @@ jobs:
echo "PR title is too long (greater than 72 characters)"
exit 1
fi
- name: Check PR labels
if: >
(contains(toJson(github.event.pull_request.labels.*.name), 'under review') == false &&
contains(toJson(github.event.pull_request.labels.*.name), 'in progress') == false) ||
(contains(toJson(github.event.pull_request.labels.*.name), 'under review') == true &&
contains(toJson(github.event.pull_request.labels.*.name), 'in progress') == true)
run: |
echo "PR must have "exactly one" of these labels: [ 'under review', 'in progress' ]."
exit 1
32 changes: 28 additions & 4 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand All @@ -41,6 +41,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -92,6 +95,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -133,6 +139,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $Env:GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
if (test-path "./MM_VERSION") {
Expand Down Expand Up @@ -176,6 +185,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -209,7 +221,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand All @@ -231,6 +243,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -273,6 +288,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -306,7 +324,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand All @@ -328,6 +346,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down Expand Up @@ -363,7 +384,7 @@ jobs:

- name: pre scripts for ci container
run: |
git config --global --add safe.directory /__w/atomicDEX-API/atomicDEX-API
git config --global --add safe.directory /__w/komodo-defi-framework/komodo-defi-framework
echo "/bin" >> $GITHUB_PATH
echo "/usr/bin" >> $GITHUB_PATH
echo "/root/.cargo/bin" >> $GITHUB_PATH
Expand All @@ -385,6 +406,9 @@ jobs:
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV

- name: Cargo cache
uses: ./.github/actions/cargo-cache

- name: Build
run: |
rm -f ./MM_VERSION
Expand Down
Loading

0 comments on commit ef89614

Please sign in to comment.