Skip to content

Commit

Permalink
Modernize CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed May 13, 2024
1 parent 8486929 commit db2db22
Showing 1 changed file with 5 additions and 45 deletions.
50 changes: 5 additions & 45 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
override: true

- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('rust-toolchain') }}-
- name: Build dependencies
run: sudo apt install -y ca-certificates libssl-dev

- name: Compile
run: cargo rustc -- -D warnings
run: cargo check -- -A warnings

- name: Unit tests
run: RUST_LOG=asmr=debug cargo test
Expand All @@ -36,37 +23,13 @@ jobs:
needs: unit-tests

steps:
- uses: actions/checkout@v2

- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
override: true
- uses: actions/checkout@v3

- name: Install coin dependencies
run: |
sudo apt-get update
# Electrum dependencies
sudo apt-get install libsecp256k1-0 python3-setuptools python3-cryptography
# Nano dependencies
curl -L 'https://s3.us-east-2.amazonaws.com/repo.nano.org/artifacts/boost-Linux-gcc-1.70-full.tgz' | tar -C / -xzf -
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('rust-toolchain') }}-
- name: Nano-node cache
uses: actions/cache@v2
with:
path: ~/coins/nano/nano_node
key: ${{ runner.os }}-nano-node-develop
- name: Pip cache
uses: actions/cache@v2
Expand All @@ -83,8 +46,5 @@ jobs:
- name: Setup Monero
run: ./ci/setup-coins/monero.sh

- name: Setup Nano
run: ./ci/setup-coins/nano.sh

- name: Run Litecoin-Monero swap tests
run: RUST_LOG=asmr=debug cargo test --features test_litecoin_node,test_monero_node -- ltc_and_xmr --nocapture

0 comments on commit db2db22

Please sign in to comment.