Skip to content

Commit

Permalink
chore(CI): build a portable binary in CI for different CPU architectu…
Browse files Browse the repository at this point in the history
…res (#1504)

* chore(CI): RocksDB uses `-march=native`, Axon uses it too

* chore(CI): build a portable binary in CI for different CPU architectures
  • Loading branch information
Flouse authored Oct 27, 2023
1 parent 9a0bdbd commit 363b49f
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 9 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/axon-start-with-short-genesis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build
- name: Start a single Axon node
env:
Expand Down Expand Up @@ -87,7 +92,12 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build
- name: Start multiple Axon nodes
env:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/hardfork_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build
- name: Start multiple Axon nodes
env:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/openzeppelin_test_11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build
- name: Deploy Local Network of Axon
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/openzeppelin_test_16_19.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build
- name: Deploy Local Network of Axon
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/openzeppelin_test_1_5_and_12_15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build
- name: Deploy Local Network of Axon
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/openzeppelin_test_6_10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build
- name: Deploy Local Network of Axon
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/v3_core_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build
- name: Deploy Local Network of Axon
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/web3_compatible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build
run: |
# check for AVX2 support by inspecting `/proc/cpuinfo` or running `lscpu`
# related issue: https://github.com/axonweb3/axon/issues/1387
lscpu
# PORTABLE=1 USE_SSE=1 tell rocksdb to target AVX2
PORTABLE=1 USE_SSE=1 cargo build
- name: Deploy Local Network of Axon
run: |
./target/debug/axon init \
Expand Down

0 comments on commit 363b49f

Please sign in to comment.