Skip to content

Commit

Permalink
rm 32 cores machines and adjust binaries builds
Browse files Browse the repository at this point in the history
  • Loading branch information
d-roak committed Sep 22, 2023
1 parent 71397cf commit 9fea6f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 65 deletions.
69 changes: 5 additions & 64 deletions .github/workflows/binaries-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,20 @@ jobs:
- aarch64-unknown-linux-gnu
- x86_64-apple-darwin
- x86_64-unknown-linux-gnu
# https://github.com/rust-rocksdb/rust-rocksdb/issues/665
# - x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
include:
- build: aarch64-apple-darwin
os: macos-latest-xl
os: macos-latest
bin_name: madara
- build: aarch64-unknown-linux-gnu
os: ubuntu-latest-32-cores
os: ubuntu-latest
bin_name: madara
- build: x86_64-apple-darwin
os: macos-latest-xl
os: macos-latest
bin_name: madara
- build: x86_64-unknown-linux-gnu
os: ubuntu-latest-32-cores
os: ubuntu-latest
bin_name: madara
- build: x86_64-pc-windows-msvc
os: windows-latest
Expand All @@ -53,67 +52,9 @@ jobs:
run: |
rustup target add ${{ matrix.build }}
- name: Setup build deps (linux)
if:
matrix.build == 'x86_64-unknown-linux-gnu' || matrix.build ==
'aarch64-unknown-linux-gnu'
run: |
sudo apt update
sudo apt install -y clang llvm libudev-dev protobuf-compiler libssl-dev
- name: Setup build deps (aarch64-unknown-linux-gnu)
if: matrix.build == 'aarch64-unknown-linux-gnu'
run: |
sudo apt update
sudo apt install -y g++-aarch64-linux-gnu libc6-dev-arm64-cross
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc
export CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g+
- name: Setup build deps (x86_64-apple-darwin)
if:
matrix.build == 'x86_64-apple-darwin' || matrix.build ==
'aarch64-apple-darwin'
run: |
brew install protobuf
- name: Setup build deps (x86_64-pc-windows-msvc)
if: matrix.build == 'x86_64-pc-windows-msvc'
run: |
choco install -y protoc llvm
mkdir C:/tmp/madara-libs
(New-Object net.webclient).Downloadfile("https://github.com/keep-starknet-strange/madara-infra/releases/download/win-bins-build-libs/libjemalloc.a", "C:/tmp/madara-libs/libjemalloc.a")
(New-Object net.webclient).Downloadfile("https://github.com/keep-starknet-strange/madara-infra/releases/download/win-bins-build-libs/rocksdb.lib", "C:/tmp/madara-libs/rocksdb.lib")
- name: Build (x86_64 linux and x86_64/aarch64 apple)
if:
matrix.build == 'x86_64-unknown-linux-gnu' || matrix.build ==
'x86_64-apple-darwin' || matrix.build == 'aarch64-apple-darwin'
- name: Build binaries
run: cargo build --release --target ${{ matrix.build }}

- name: Build (aarch64-unknown-linux-gnu)
if: matrix.build == 'aarch64-unknown-linux-gnu'
run: |
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc
export CC_aarch64_unknown_linux_gnu=/usr/bin/aarch64-linux-gnu-gcc
export CXX_aarch64_unknown_linux_gnu=/usr/bin/aarch64-linux-gnu-g++
cargo build --release --target ${{ matrix.build }}
- name: Pre-Build (x86_64-pc-windows-msvc)
if: matrix.build == 'x86_64-pc-windows-msvc'
shell: bash
run: |
cargo fetch --target ${{ matrix.build }}
export reg_folder=$(ls C:/Users/runneradmin/.cargo/registry/src | grep github.com)
export pdb_folder=$(ls C:/Users/runneradmin/.cargo/registry/src/$reg_folder | grep parity-db)
sed -ir 's/madvise_random(_id: TableId, _map: \&mut memmap2::MmapMut)/madvise_random(_map: \&mut memmap2::MmapMut)/g' C:/Users/runneradmin/.cargo/registry/src/$reg_folder/$pdb_folder/src/file.rs
- name: Build (x86_64-pc-windows-msvc)
if: matrix.build == 'x86_64-pc-windows-msvc'
shell: bash
run: |
JEMALLOC_OVERRIDE=C:/tmp/madara-libs/libjemalloc.a ROCKSDB_LIB_DIR=C:/tmp/madara-libs cargo build --release --target ${{ matrix.build }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
rust_build:
runs-on: ubuntu-latest-32-cores
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

Expand Down

0 comments on commit 9fea6f8

Please sign in to comment.