Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed builds for OSX, iOS, Android, Windows and sped them up #54

Merged
merged 130 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
18c364f
chore: Updated action file for Windows
EduMenges May 14, 2024
3f1d175
chore: Fixed missing bindgen in action
EduMenges May 14, 2024
ff9cf75
chore: Fixed (?) Linux action
EduMenges May 14, 2024
6bdc908
chore: Fixed the fix of the Linux action
EduMenges May 14, 2024
14ec166
chore: Re-fixed Windows action
EduMenges May 14, 2024
add3afe
style: Reformatted files and removed headers
EduMenges May 15, 2024
844f3c4
chore: Added manual install to libstdc++
EduMenges May 15, 2024
ce7aaff
chore: Removed CMAKE_BUILD_TYPE in favor of generator expressions
EduMenges May 15, 2024
ac3c638
chore: Fixed generator expression
EduMenges May 15, 2024
4b191d9
chore: Removed libc++ install for Linux
EduMenges May 15, 2024
657c09d
chore: CXX_STANDARD is now defined in the CommonCompilerOptions
EduMenges May 15, 2024
fa2639a
chore: Fixed flags for Windows
EduMenges May 16, 2024
4adbe3e
chore: Fixed comments
EduMenges May 16, 2024
7d465f9
chore: Fixed generator expressions
EduMenges May 16, 2024
9a59c8c
chore: Fixed more CMake warning
EduMenges May 16, 2024
7783f99
chore: Cleaned dead code
EduMenges May 16, 2024
5326be5
chore: Expanded tasks in the actions
EduMenges May 17, 2024
29a9051
chore: Removed unused "FORCE_MULTILE" setting
EduMenges May 17, 2024
75b385c
chore: Fixed missing Rust's target add
EduMenges May 17, 2024
34e8f71
chore: Added check for cbindgen install
EduMenges May 17, 2024
c3a6de7
chore: Removed multi-processing compiling in Windows
EduMenges May 17, 2024
3bc41a2
chore: Condensed gRPC settings
EduMenges May 17, 2024
03a2814
chore: Removed redundant MSVC settings
EduMenges May 17, 2024
494332c
chore: Disabled parallel in Windows action for testing
EduMenges May 17, 2024
27adec8
chore: Bumped AsyncIOManager
EduMenges May 20, 2024
e0ed519
chore: Re-added build type and CXX standard to external projects
EduMenges May 20, 2024
ae56fcb
chore: Added more dependencies to AsyncIOManager
EduMenges May 20, 2024
e8bdadd
chore: Turned Windows yml into debug mode
EduMenges May 20, 2024
4bb8a72
chore: Corrected space in generator expression
EduMenges May 20, 2024
8631f27
chore: Reverted Windows action to release
EduMenges May 20, 2024
bdd62c0
chore: Fixed iOS action
EduMenges May 20, 2024
9547b01
chore: Updated OSX action
EduMenges May 20, 2024
3b6c1cb
chore: Updated Android action
EduMenges May 20, 2024
3959603
chore: Attempt to fix iOS action
EduMenges May 20, 2024
2af60bb
chore: Added new multi tool property for MSVC builds
EduMenges May 21, 2024
1d7c5d1
chore: Added CXX standard to Boost
EduMenges May 21, 2024
52ce42b
revert: Disabled parallel builds for Linux as a test
EduMenges May 21, 2024
14efe3e
chore: Disabled parallel builds
EduMenges May 21, 2024
feb9596
chore: Switched INSTALL_PREFIX to INSTALL_DIR
EduMenges May 21, 2024
a3eabc8
chore: Updated Boost-for-Android
EduMenges May 21, 2024
8fa2bb1
chore: Fixed OpenSSL build
EduMenges May 22, 2024
0446bcf
chore: Using generator expression instead of BUILD_TYPE
EduMenges May 22, 2024
e8da8ca
revert: Removed generator expression due to limitation in ExternalPro…
EduMenges May 23, 2024
40c45c2
chore: Updated Boost-forAndroid
EduMenges May 23, 2024
efa2fb9
chore: Fixed PATH in Android action
EduMenges May 23, 2024
b8f3d2a
chore: Fixed protobuf plugin install dir
EduMenges May 23, 2024
11121c2
chore: Restored parallel builds for Linux-based actions
EduMenges May 23, 2024
31bcb2f
chore: Fixed permissions in OSX build
EduMenges May 24, 2024
fc1cfba
Merge branch 'develop' into actions-exploring
EduMenges May 24, 2024
44f75f2
chore: Extracted Boost libraries
EduMenges May 28, 2024
ef0a691
chore: Updated AsyncIOManager
EduMenges May 28, 2024
81e6844
Merge branch 'develop' into actions-exploring
EduMenges May 28, 2024
1e6a369
chore: Fixed libp2p build
EduMenges May 28, 2024
d1d4281
chore: Disabled absl build
EduMenges May 29, 2024
0c417c5
chore: Attempt to fix OSX build
EduMenges May 29, 2024
174a47e
chore: Extracted OpenSSL config mode in Windows
EduMenges May 29, 2024
6944b71
chore: Attempt to remove enum-constexpr-conversion error in Clang builds
EduMenges May 29, 2024
078fae5
chore: Attempt to fix Windows static build
EduMenges May 29, 2024
b863173
chore: Disabled error for enum constexpr conversion on all clang builds
EduMenges May 29, 2024
2f39329
chore: Enabled passage of VS globals to external projects
EduMenges May 29, 2024
3a8b3f6
chore: Attempt to speed up build by adding ccache
EduMenges May 30, 2024
01bcc60
chore: Fixed unary function error in libc++ builds
EduMenges May 30, 2024
7106b7d
chore: Removed unnecessary bindgen install in actions since GH alread…
EduMenges May 30, 2024
df0593c
chore: Changed Boost builds on OSX
EduMenges May 31, 2024
7c27a3e
chore: Boost builds now uses CMAKE_CXX_FLAGS
EduMenges May 31, 2024
4341fa6
chore: Bumped minimum CMake version
EduMenges May 31, 2024
faa614b
chore: Fixed merge mistake
EduMenges May 31, 2024
d08f47e
chore: Added Ninja to OSX action
EduMenges May 31, 2024
0586224
chore: Fixed STRIP in CMake file
EduMenges Jun 3, 2024
a8c137b
chore: Small refactor on build-targets to use direct gh cache
EduMenges Jun 3, 2024
ea0b438
chore: Added basic matrix build file
EduMenges Jun 3, 2024
2283526
chore: Workaround build-targets action
EduMenges Jun 3, 2024
0cd0eb1
chore: Fixed paths
EduMenges Jun 3, 2024
e136401
chore: Added bindgen install on Darwin builds
EduMenges Jun 4, 2024
af7d93f
chore: Updated iOS toolchain file
EduMenges Jun 4, 2024
dae9d42
chore: Updated Boost's iOS script from its upstream
EduMenges Jun 4, 2024
1a1efcf
chore: Attempt to use raw B2 instead of script for boost compiling
EduMenges Jun 4, 2024
ff15f9a
chore: Included iOS toolchain file
EduMenges Jun 5, 2024
a31c706
chore: Added LANGUAGES to CMake projects
EduMenges Jun 5, 2024
be70cf6
chore: Bumped zlib to avoid compiler warnings and improve CMake compa…
EduMenges Jun 5, 2024
174321e
chore: Updated c-ares to remove CMake warning
EduMenges Jun 5, 2024
de4fec5
chore: Removed hard-coded sqlite3 submodule
EduMenges Jun 5, 2024
f1b7d45
chore: Added sqlite3 as submodule
EduMenges Jun 5, 2024
786b6dc
chore: Changed SQLiteModernCpp upstream to a more recent one
EduMenges Jun 6, 2024
249f930
chore: Added toolchain file to propagation
EduMenges Jun 6, 2024
9586518
chore: Disabled extra tools in build in yaml-cpp
EduMenges Jun 6, 2024
4dd541e
chore: Added CXX_STANDARD propagation to Xcode generators
EduMenges Jun 6, 2024
ceb82e2
chore: Moved flags strip to proper place
EduMenges Jun 7, 2024
de1a878
chore: Changed upstream of libscep256k1 and updated it
EduMenges Jun 7, 2024
ed1b22f
chore: Updated ips-lite
EduMenges Jun 7, 2024
5d29339
chore: Fixed build in rocksdb for iOS
EduMenges Jun 7, 2024
87ca0d1
chore: Using forked sqlite3 due to iOS build problems
EduMenges Jun 7, 2024
a04e3e9
chore: Attempt to unify Darwin & iOS builds
EduMenges Jun 10, 2024
0e0e0f9
chore: Removed redundant ed25519 configurations
EduMenges Jun 10, 2024
817049a
chore: gRPC depends on protobuf
EduMenges Jun 10, 2024
cb98570
chore: Wrong protobuf path in OSX
EduMenges Jun 10, 2024
4ab8af9
chore: Fixing toolchain file behavior
EduMenges Jun 10, 2024
ae982ea
chore: Started to unify protobuf builds
EduMenges Jun 11, 2024
2e1b8aa
chore: gRPC now uses our zlib
EduMenges Jun 11, 2024
c6628f7
chore: Solved protobuf compiling
EduMenges Jun 12, 2024
f0d6f6f
chore: Fixed (?) boost builds for Android and Linux
EduMenges Jun 12, 2024
5bf30fc
chore: Fixed regressions
EduMenges Jun 12, 2024
f87cc1d
chore: Forcing MSVC_STATIC for gRPC and protobuf builds
EduMenges Jun 12, 2024
25b8789
Updated how boost is built accross all systems
EduMenges Jun 13, 2024
8a99eac
Fixed ed25519 hash
EduMenges Jun 13, 2024
1858474
Removed unused includes
EduMenges Jun 13, 2024
51a92a6
Removed unused patches
EduMenges Jun 14, 2024
056bddc
Fixed CMAKE_CROSSCOMPILING in Apple builds
EduMenges Jun 14, 2024
fe27664
gRPC now uses ours c-ares
EduMenges Jun 17, 2024
2fd843a
Removed MACOSX_BUNDLE from Apple's toolchain file since it doesn't ma…
EduMenges Jun 17, 2024
f376b9b
Using new branch for wallet-core for testing
EduMenges Jun 17, 2024
2de6207
Added codegen check to gRPC
EduMenges Jun 19, 2024
2ab490a
Updated gRPC to fix iOS builds
EduMenges Jun 20, 2024
5c1251e
Corrections in Apple's toolchain file for iOS
EduMenges Jun 20, 2024
d68b3a1
Fixed protobuf-plugin compiling for iOS
EduMenges Jun 21, 2024
f2a1644
Updated grpc's absl to fix iOS builds
EduMenges Jun 21, 2024
edc4765
Removed redundant MNN settings
EduMenges Jun 25, 2024
b64e7fd
Fixed spdlog linking
EduMenges Jun 25, 2024
0eeda8f
Fixed Windows builds
EduMenges Jun 26, 2024
0069d0c
Merge branch 'develop' into actions-exploring
EduMenges Jun 26, 2024
6cc8dac
Fixed secp256k1 release builds
EduMenges Jun 27, 2024
23bf790
Fixes from review
EduMenges Jun 28, 2024
f3b192f
Removed push and pull_request triggers on legacy actions
EduMenges Jul 1, 2024
3108e89
Added barebones matrix build action for testing purposes
EduMenges Jul 1, 2024
c8c4a3d
Fix: wallet-core with latest fixes
henriqueaklein Jul 2, 2024
acc911e
Fixed libp2p OpenSSL linkage
EduMenges Jul 2, 2024
10e1dcf
Fixed default OSX platform
EduMenges Jul 2, 2024
dc6be8f
Added `ENABLE`settings to iOS
EduMenges Jul 2, 2024
6267fe3
Attempt to fix OSX CI by using module compatible protobuf
EduMenges Jul 3, 2024
15afffe
Fixed OpenSSL for Android
EduMenges Jul 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Run this command to always ignore formatting commits in `git blame`
# git config blame.ignoreRevsFile .git-blame-ignore-revs

# Reformats
add3afe37be3f3e08f1139363d3c02270d21512d

# Documentation
4adbe3e8e55760ff78c38e455fa0cb45d6fcee01
124 changes: 43 additions & 81 deletions .github/workflows/Android-cmake.yml
Original file line number Diff line number Diff line change
@@ -1,87 +1,49 @@
# This is a basic workflow to help you get started with Actions

name: Android Build

# Controls when the workflow will run
# Triggers the workflow on push or pull request events and manually from the Actions tab
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
- '.github/workflows/**'
- '.gitignore'
pull_request:
workflow_dispatch:

env:
CMAKE_BUILD_PARALLEL_LEVEL: 8

jobs:
Android:
runs-on: ubuntu-latest
env:
ANDROID_NDK_HOME: ${{github.workspace}}/android-ndk/android-ndk-r25b
ANDROID_TOOLCHAIN: ${{github.workspace}}/android-ndk/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin
NDK_URL: "https://dl.google.com/android/repository/android-ndk-r25b-linux.zip"
MAKEFLAGS: "-j 8"

steps:
- name: Setup Git to make sure crlf -> lf
run: |
git config --global core.autocrlf false
git config --global core.eol lf
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: 'recursive'

#- uses: nttld/setup-ndk@v1
# id: setup-ndk
# with:
# ndk-version: r21e

- name: Download Android NDK
run: |
mkdir "${{github.workspace}}/android-ndk"
cd "${{github.workspace}}/android-ndk"
curl -o ndk.zip ${{ env.NDK_URL }}
unzip ndk.zip
rm ndk.zip
- name: Install Rust dependencies
run: |
rustup update
rustup toolchain install stable
rustup default stable
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android
cargo install cbindgen

- name: Create Build Directory
run: cmake -E make_directory ${{github.workspace}}/.build

- name: Set PATH
run: echo "${{env.ANDROID_TOOLCHAIN}}" >> $GITHUB_PATH

- name: Configure CMake
env:
CC: clang

working-directory: ${{github.workspace}}/.build
run: |
export ANDROID_NDK=${{env.ANDROID_NDK_HOME}}
export ANDROID_NDK_HOME=${{env.ANDROID_NDK_HOME}}
export ANDROID_TOOLCHAIN=${{env.ANDROID_TOOLCHAIN}}
echo $PATH
export PATH=${{env.ANDROID_TOOLCHAIN}}:$PATH
echo $PATH
echo $CC
ls -la $ANDROID_TOOLCHAIN
echo "Check clang path:"
which clang
env
cmake -S ../build/Android/ -DANDROID_ABI="arm64-v8a" -DCMAKE_ANDROID_NDK=$ANDROID_NDK -DANDROID_TOOLCHAIN=clang
- name: Compile
working-directory: ${{github.workspace}}/.build
run: make

build:
runs-on: ubuntu-latest
env:
ANDROID_NDK_HOME: ${{github.workspace}}/android-ndk/android-ndk-r25b
ANDROID_TOOLCHAIN: ${{github.workspace}}/android-ndk/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin
NDK_URL: "https://dl.google.com/android/repository/android-ndk-r25b-linux.zip"

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Set clang as the default compiler
run: |
sudo update-alternatives --install /usr/bin/cc cc $(which clang) 100
sudo update-alternatives --install /usr/bin/c++ c++ $(which clang++) 100
sudo update-alternatives --set cc $(which clang)
sudo update-alternatives --set c++ $(which clang++)

- name: Download Android NDK
run: |
mkdir -p "${{github.workspace}}/android-ndk"
cd "${{github.workspace}}/android-ndk"
curl -o ndk.zip ${{ env.NDK_URL }}
unzip ndk.zip
rm ndk.zip
echo "$ANDROID_TOOLCHAIN" >> $GITHUB_PATH

- name: Add Rust targets
run: rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android

- name: Install bindgen
run: cargo install cbindgen

- name: Install Ninja
run: sudo apt install ninja-build -y

- name: Configure CMake
run: cmake -S build/Android/ -DANDROID_ABI="arm64-v8a" -B build/Android/Release -DCMAKE_ANDROID_NDK=$ANDROID_NDK -DANDROID_TOOLCHAIN=clang -DCMAKE_BUILD_TYPE=Release -G Ninja

- name: Build project
run: cmake --build build/Android/Release --config Release -j
71 changes: 29 additions & 42 deletions .github/workflows/Linux-cmake.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,36 @@
# This is a basic workflow to help you get started with Actions

name: Linux Build

# Controls when the workflow will run
# Triggers the workflow on push or pull request events and manually from the Actions tab
on:
workflow_dispatch:

env:
CMAKE_BUILD_PARALLEL_LEVEL: 8

jobs:
Linux:
runs-on: ubuntu-latest
env:
MAKEFLAGS: "-j 8"
steps:
- name: Configure clang
run: |
sudo apt-get update && sudo apt install -y clang
sudo apt install -y libc++-dev libc++abi-dev
sudo update-alternatives --set cc /usr/bin/clang
sudo update-alternatives --set c++ /usr/bin/clang++
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Install Rust dependencies
run: |
rustup update
rustup toolchain install stable
rustup default stable
rustup target add x86_64-unknown-linux-gnu
rustup target add wasm32-unknown-emscripten
cargo install cbindgen

- name: Create Build Directory
run: cmake -E make_directory ${{github.workspace}}/.build

- name: Configure CMake
working-directory: ${{github.workspace}}/.build
run: cmake -S ../build/Linux/ -DCMAKE_BUILD_TYPE=Release

- name: Compile
working-directory: ${{github.workspace}}/.build
run: make
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Set clang as the default compiler
run: |
sudo update-alternatives --install /usr/bin/cc cc $(which clang) 100
sudo update-alternatives --install /usr/bin/c++ c++ $(which clang++) 100
sudo update-alternatives --set cc $(which clang)
sudo update-alternatives --set c++ $(which clang++)

- name: Add Rust target
run: rustup target add wasm32-unknown-emscripten

- name: Install Ninja
run: sudo apt install ninja-build -y

- name: Install ccache
run: sudo apt install ccache -y

- name: Configure CMake
run: cmake -S build/Linux/ -B build/Linux/Release -DCMAKE_BUILD_TYPE=Release -G Ninja

- name: Build project
run: cmake --build build/Linux/Release --config Release -j
54 changes: 14 additions & 40 deletions .github/workflows/OSX-cmake.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,33 @@
# This is a basic workflow to help you get started with Actions

name: Mac OSX Build

# Controls when the workflow will run
# Triggers the workflow on push or pull request events and manually from the Actions tab
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
- '.github/workflows/**'
- '.gitignore'
pull_request:
workflow_dispatch:

env:
CMAKE_BUILD_PARALLEL_LEVEL: 8

jobs:
MacOS:
env:
MAKEFLAGS: "-j 8"
runs-on: macos-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'

# Workaround for arm64 build
- name: Ensure latest macOS SDK is used
run: |
sudo xcode-select --switch "$(find /Applications -mindepth 1 -maxdepth 1 ! -type l | grep "Xcode_[\.0-9]*app" | sort -V | tail -1)/Contents/Developer"
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
submodules: "recursive"

- name: Install Rust dependencies
- name: Add Rust targets
run: |
rustup update
rustup toolchain install stable
rustup default stable
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
rustup target add wasm32-unknown-emscripten
cargo install cbindgen cargo-lipo

- name: Create Build Directory
run: |
cmake -E make_directory ${{github.workspace}}/.build
- name: Install bindgen
run: cargo install cbindgen
EduMenges marked this conversation as resolved.
Show resolved Hide resolved

- name: Install Ninja
run: brew install ninja

- name: Install ccache
run: brew install ccache

- name: Configure CMake
working-directory: ${{github.workspace}}/.build
run: cmake -S ../build/OSX/ -DCMAKE_BUILD_TYPE=Release
run: cmake -S build/OSX -B build/OSX/Release -DCMAKE_BUILD_TYPE=Release -G Ninja

- name: Compile
working-directory: ${{github.workspace}}/.build
run: make

run: cmake --build build/OSX/Release --config Release -j
55 changes: 11 additions & 44 deletions .github/workflows/Windows-cmake.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,25 @@
# This is a basic workflow to help you get started with Actions

name: Windows Build

# Controls when the workflow will run
# Triggers the workflow on push or pull request events and manually from the Actions tab
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
- '.github/workflows/**'
- '.gitignore'
pull_request:
workflow_dispatch:

env:
CMAKE_BUILD_PARALLEL_LEVEL: 8

jobs:
Windows:
build:
runs-on: windows-2022
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v1
- name: Checkout
uses: actions/checkout@v4
with:
sdk-version: 22000
submodules: "recursive"

# Sets up the visual studio environment to build x64
- name: Configure build for Windows 10 x64
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Install Rust dependencies
run: |
rustup update
rustup toolchain install stable
rustup default stable
rustup set default-host x86_64-pc-windows-msvc
rustup target add x86_64-pc-windows-msvc
rustup target add wasm32-unknown-emscripten
cargo install cbindgen
- name: Add Rust target
run: rustup target add wasm32-unknown-emscripten

- name: Create Build Directory
run: cmake -E make_directory ${{github.workspace}}/.build
- name: Install ccache
run: choco install ccache -y

- name: Configure CMake
working-directory: ${{github.workspace}}/.build
run: cmake -S ../build/Windows/ -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_VERSION="10.0"

- name: Compile
working-directory: ${{github.workspace}}/.build
run: cmake --build . --config Release
run: cmake -S build/Windows -B build/Windows/Release -DCMAKE_BUILD_TYPE=Release

- name: Build project
run: cmake --build build/Windows/Release --config Release -j
Loading
Loading