Skip to content

Commit 446982c

Browse files
authored
Backport #394
1 parent c9fc67a commit 446982c

File tree

9 files changed

+229
-267
lines changed

9 files changed

+229
-267
lines changed

.github/workflows/develop.yml

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
name: develop
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
9+
linux-x86-deny:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
# https://github.com/EmbarkStudios/cargo-deny-action
14+
- uses: EmbarkStudios/cargo-deny-action@v1
15+
with:
16+
arguments: --all-features
17+
command: check advisories licenses sources bans
18+
19+
linux-x86-ci-generated:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Run ci-generated
24+
run: make ci-generated
25+
26+
linux-x86-ci:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v3
30+
- name: Run ci
31+
run: rustup component add clippy rustfmt && make ci
32+
33+
linux-x86-ci-asm:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v3
37+
- name: Run ci-asm
38+
run: make ci-asm
39+
40+
linux-x86-ci-asm-chaos:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v3
44+
- name: Run ci-asm-chaos
45+
run: make ci-asm-chaos
46+
47+
linux-x86-test-suite:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v3
51+
- name: Install dependencies
52+
run: |
53+
sudo apt install -y git \
54+
build-essential \
55+
autoconf \
56+
automake \
57+
autotools-dev \
58+
libmpc-dev \
59+
libmpfr-dev \
60+
libgmp-dev \
61+
gawk \
62+
libtool \
63+
patchutils \
64+
libexpat-dev \
65+
zlib1g-dev
66+
- name: Run test suite
67+
run: |
68+
git clone https://github.com/nervosnetwork/ckb-vm-test-suite
69+
ln -snf .. ckb-vm-test-suite/ckb-vm
70+
docker run --rm -v `pwd`:/code nervos/ckb-riscv-gnu-toolchain:bionic-20210804 cp -r /riscv /code/riscv
71+
cd ckb-vm-test-suite
72+
git checkout 441e0f2149c097ccad133b040544dca13caeb01e
73+
git submodule update --init --recursive
74+
RISCV=`pwd`/../riscv ./test.sh
75+
76+
linux-x86-test-spawn:
77+
runs-on: ubuntu-latest
78+
steps:
79+
- uses: actions/checkout@v3
80+
- name: Run spawn tests in release
81+
run: cargo test test_spawn --release --features=asm -- --nocapture
82+
83+
linux-arm-ci-asm:
84+
runs-on: ubuntu-latest
85+
steps:
86+
- uses: actions/checkout@v3
87+
- name: Install dependencies
88+
run: |
89+
sudo apt-get update -y
90+
sudo apt install -y build-essential \
91+
autoconf \
92+
automake \
93+
autotools-dev \
94+
libmpc-dev \
95+
libmpfr-dev \
96+
libgmp-dev \
97+
gawk \
98+
libtool \
99+
patchutils \
100+
libexpat-dev \
101+
zlib1g-dev \
102+
gcc-aarch64-linux-gnu \
103+
g++-aarch64-linux-gnu \
104+
qemu-user-static
105+
rustup target add aarch64-unknown-linux-gnu
106+
- name: Run ci-asm
107+
run: |
108+
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc &&
109+
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C link-args=-L -C link-args=/usr/lib/gcc-cross/aarch64-linux-gnu/11" &&
110+
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-aarch64-static -L /usr/aarch64-linux-gnu" &&
111+
cargo test --features=asm --target aarch64-unknown-linux-gnu
112+
113+
linux-arm-test-suite:
114+
runs-on: ubuntu-latest
115+
steps:
116+
- uses: actions/checkout@v3
117+
- name: Install dependencies
118+
run: |
119+
sudo apt update -y
120+
sudo apt install -y build-essential \
121+
autoconf \
122+
automake \
123+
autotools-dev \
124+
libmpc-dev \
125+
libmpfr-dev \
126+
libgmp-dev \
127+
gawk \
128+
libtool \
129+
patchutils \
130+
libexpat-dev \
131+
zlib1g-dev
132+
rustup target add aarch64-unknown-linux-gnu
133+
- name: Build test suite
134+
run: |
135+
git clone https://github.com/nervosnetwork/ckb-vm-test-suite
136+
ln -snf .. ckb-vm-test-suite/ckb-vm
137+
docker run --rm -v `pwd`:/code nervos/ckb-riscv-gnu-toolchain:bionic-20210804 cp -r /riscv /code/riscv
138+
cd ckb-vm-test-suite
139+
git checkout 441e0f2149c097ccad133b040544dca13caeb01e
140+
git submodule update --init --recursive
141+
RISCV=`pwd`/../riscv ./test.sh --build-only
142+
cd ..
143+
- name: Run test suite
144+
run: |
145+
sudo apt install -y qemu binfmt-support qemu-user-static
146+
sudo apt install -y gcc-multilib
147+
sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu clang
148+
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
149+
cd ckb-vm-test-suite
150+
cd binary && cargo build --release --target=aarch64-unknown-linux-gnu && cd ..
151+
cd ..
152+
docker run --rm -v `pwd`:/code -t --platform linux/arm64 arm64v8/rust bash -c "RISCV=/dummy /code/ckb-vm-test-suite/test.sh --prebuilt-prefix aarch64-unknown-linux-gnu"
153+
154+
macos-x86-ci-asm:
155+
runs-on: macos-latest
156+
steps:
157+
- uses: actions/checkout@v3
158+
- name: Run ci-asm
159+
run: make ci-asm
160+
161+
windows-x86-ci-asm:
162+
runs-on: windows-latest
163+
steps:
164+
- uses: actions/checkout@v3
165+
- name: Install dependencies
166+
shell: pwsh
167+
# https://github.com/ScoopInstaller/Install#for-admin
168+
run: |
169+
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
170+
scoop install mingw
171+
- name: Run ci-asm
172+
shell: pwsh
173+
run: |
174+
make ci-asm

azure-pipelines.yml

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

0 commit comments

Comments
 (0)