Skip to content

Commit 8cf76fb

Browse files
committed
fix: CI and irohad version
Signed-off-by: Sam H. Smith <[email protected]>
1 parent b090d49 commit 8cf76fb

File tree

5 files changed

+378
-214
lines changed

5 files changed

+378
-214
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/pr-pytests.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
pull_request:
77
branches: [main]
88

9-
env:
10-
IROHA_REF: main
11-
129
jobs:
1310
pytest:
1411
runs-on: ubuntu-latest
@@ -20,26 +17,30 @@ jobs:
2017
uses: actions/setup-python@v4
2118
with:
2219
python-version: ${{ matrix.python-version }}
23-
- name: Install dependencies
24-
run: pip install poetry
25-
- name: Checkout iroha main repo code
26-
uses: actions/checkout@v4
27-
with:
28-
repository: 'hyperledger/iroha'
29-
ref: ${{ env.IROHA_REF}}
30-
- name: Run docker-compose.yml containers
31-
run: docker compose -f ./defaults/docker-compose.yml up --wait || exit 1
3220
- name: Checkout code
3321
uses: actions/checkout@v4
34-
- name: Maturin build
35-
run: |
36-
pip install maturin
37-
maturin build
38-
poetry add target/wheels/*
39-
- name: Install project dependencies
40-
run: poetry install
41-
- name: Run tests
42-
run: poetry run pytest tests
43-
- name: Tear down docker containers
44-
if: always()
45-
run: docker stop $(docker ps -q) && docker rm $(docker ps -a -q)
22+
- name: Install dependencies
23+
run: pip install poetry tomli-w
24+
- name: Checkout irohad repo code
25+
run: git clone --depth 1 https://github.com/hyperledger-iroha/iroha.git -b 2.0.0-rc.1 iroha_daemon
26+
- name: Install correct rust version
27+
run: rustup install nightly-2024-09-09 && rustup component add rust-src --toolchain nightly-2024-09-09
28+
- name: Set toolchain
29+
run: rustup default nightly-2024-09-09
30+
- name: Build irohad
31+
run: cd iroha_daemon && cargo build --release && mkdir target/debug -p && cp target/release/irohad target/debug/irohad && cp target/release/iroha target/debug/iroha
32+
- name: Build kagami
33+
run: cd iroha_daemon && cargo build --bin kagami
34+
- name: Build default executor
35+
run: cd iroha_daemon && cargo run --release --bin iroha_wasm_builder -- build ./wasm_samples/default_executor --optimize --out-file ./defaults/executor.wasm
36+
- name: Maturin build and Run tests
37+
run: bash -c " pip install maturin &&
38+
maturin build &&
39+
cd iroha_daemon && scripts/test_env.py setup && cd .. &&
40+
python -m venv .venv &&
41+
source .venv/bin/activate &&
42+
pip install pytest faker allure-pytest &&
43+
pip install --break-system-packages target/wheels/iroha-*.whl &&
44+
python -m pytest tests/"
45+
- name: Tear down the network
46+
run: cd iroha_daemon && scripts/test_env.py cleanup

.github/workflows/pr.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)