mirror of
https://github.com/Xahau/xahaud.git
synced 2026-04-29 15:37:46 +00:00
[CONAN] use simpler GA runners with conan cache
This commit is contained in:
93
.github/workflows/macos-ga.yml
vendored
Normal file
93
.github/workflows/macos-ga.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
name: MacOS Development - Github Actions Runner
|
||||
on:
|
||||
push:
|
||||
branches: [jshooks]
|
||||
pull_request:
|
||||
branches: [jshooks]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
generator:
|
||||
- Ninja
|
||||
configuration:
|
||||
- Debug
|
||||
runs-on: macos-15
|
||||
env:
|
||||
build_dir: .build
|
||||
# NUM_PROCESSORS: 12
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Conan
|
||||
run: |
|
||||
brew install conan@1
|
||||
echo "$(brew --prefix conan@1)/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Setup Conan cache
|
||||
id: conan-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.conan
|
||||
~/.conan2
|
||||
key: ${{ runner.os }}-conan-${{ hashFiles('**/conanfile.txt', '**/conanfile.py') }}-${{ matrix.configuration }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-conan-${{ hashFiles('**/conanfile.txt', '**/conanfile.py') }}-
|
||||
${{ runner.os }}-conan-
|
||||
|
||||
- name: Install Ninja
|
||||
if: matrix.generator == 'Ninja'
|
||||
run: brew install ninja
|
||||
|
||||
- name: Install Python
|
||||
run: |
|
||||
if which python3 > /dev/null 2>&1; then
|
||||
echo "Python 3 executable exists"
|
||||
python3 --version
|
||||
else
|
||||
brew install python@3.12
|
||||
fi
|
||||
# Create python symlink if needed
|
||||
if ! which python > /dev/null 2>&1; then
|
||||
sudo ln -sf $(which python3) /usr/local/bin/python
|
||||
fi
|
||||
|
||||
- name: Install CMake
|
||||
run: |
|
||||
if which cmake > /dev/null 2>&1; then
|
||||
echo "cmake executable exists"
|
||||
cmake --version
|
||||
else
|
||||
brew install cmake
|
||||
fi
|
||||
|
||||
- name: Check environment
|
||||
run: |
|
||||
echo "PATH:"
|
||||
echo ${PATH} | tr ':' '\n'
|
||||
which python
|
||||
python --version
|
||||
which conan
|
||||
conan --version
|
||||
which cmake
|
||||
cmake --version
|
||||
clang --version
|
||||
env
|
||||
|
||||
- name: Configure Conan
|
||||
run: |
|
||||
conan profile new default --detect || true
|
||||
conan profile update settings.compiler.cppstd=20 default
|
||||
|
||||
- name: Build
|
||||
uses: ./.github/actions/build
|
||||
with:
|
||||
generator: ${{ matrix.generator }}
|
||||
configuration: ${{ matrix.configuration }}
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
${build_dir}/rippled --unittest --unitest-jobs $(nproc)
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
- Ninja
|
||||
configuration:
|
||||
- Release
|
||||
runs-on: macos-15
|
||||
runs-on: [self-hosted, macOS, ARM64]
|
||||
env:
|
||||
# The `build` action requires these variables.
|
||||
build_dir: .build
|
||||
@@ -48,14 +48,12 @@ jobs:
|
||||
python --version
|
||||
conan --version
|
||||
cmake --version
|
||||
clang --version
|
||||
env
|
||||
- name: configure Conan
|
||||
run : |
|
||||
conan profile new default --detect || true
|
||||
conan profile update settings.compiler.cppstd=20 default
|
||||
conan profile update 'conf.tools.build:cxxflags=[]' default # TODO:CONAN
|
||||
conan profile show default # Check after
|
||||
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default
|
||||
- name: build
|
||||
uses: ./.github/actions/build
|
||||
with:
|
||||
83
.github/workflows/nix-ga.yml
vendored
Normal file
83
.github/workflows/nix-ga.yml
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
name: Nix Development - GA Runner
|
||||
on:
|
||||
push:
|
||||
branches: [jshooks]
|
||||
pull_request:
|
||||
branches: [jshooks]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
compiler: [gcc] # [gcc, clang]
|
||||
configuration: [Debug]
|
||||
include:
|
||||
- compiler: gcc
|
||||
cc: gcc-11
|
||||
cxx: g++-11
|
||||
# - compiler: clang
|
||||
# cc: clang-14
|
||||
# cxx: clang++-14
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
build_dir: .build
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ninja-build ${{ matrix.cc }} ${{ matrix.cxx }}
|
||||
pip install --upgrade "conan<2"
|
||||
|
||||
- name: Setup Conan cache
|
||||
id: conan-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.conan
|
||||
key: ${{ runner.os }}-conan-${{ matrix.compiler }}-${{ hashFiles('**/conanfile.txt', '**/conanfile.py') }}-${{ matrix.configuration }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-conan-${{ matrix.compiler }}-${{ hashFiles('**/conanfile.txt', '**/conanfile.py') }}-
|
||||
${{ runner.os }}-conan-${{ matrix.compiler }}-
|
||||
|
||||
- name: Configure Conan
|
||||
run: |
|
||||
conan profile new default --detect || true
|
||||
conan profile update settings.compiler.cppstd=20 default
|
||||
conan profile update settings.compiler=${{ matrix.compiler }} default
|
||||
conan profile update settings.compiler.libcxx=libstdc++11 default
|
||||
conan profile update env.CC=/usr/bin/${{ matrix.cc }} default
|
||||
conan profile update env.CXX=/usr/bin/${{ matrix.cxx }} default
|
||||
conan profile update conf.tools.build:compiler_executables='{"c": "/usr/bin/${{ matrix.cc }}", "cpp": "/usr/bin/${{ matrix.cxx }}"}' default
|
||||
|
||||
# Set correct compiler version based on compiler type
|
||||
if [ "${{ matrix.compiler }}" = "gcc" ]; then
|
||||
conan profile update settings.compiler.version=11 default
|
||||
elif [ "${{ matrix.compiler }}" = "clang" ]; then
|
||||
conan profile update settings.compiler.version=14 default
|
||||
fi
|
||||
|
||||
- name: Check environment
|
||||
run: |
|
||||
echo "PATH: ${PATH}" | tr ':' '\n'
|
||||
conan --version
|
||||
cmake --version
|
||||
${{ matrix.cc }} --version
|
||||
${{ matrix.cxx }} --version
|
||||
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/dependencies
|
||||
with:
|
||||
configuration: ${{ matrix.configuration }}
|
||||
|
||||
- name: Build
|
||||
uses: ./.github/actions/build
|
||||
with:
|
||||
generator: Ninja
|
||||
configuration: ${{ matrix.configuration }}
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
${build_dir}/rippled --unittest --unittest-jobs $(nproc)
|
||||
@@ -10,21 +10,21 @@ jobs:
|
||||
- linux
|
||||
compiler:
|
||||
- gcc
|
||||
# - clang TODO:CONAN
|
||||
- clang
|
||||
configuration:
|
||||
- Debug
|
||||
# - Release TODO:CONAN
|
||||
- Release
|
||||
include:
|
||||
- compiler: gcc
|
||||
profile:
|
||||
version: 11
|
||||
cc: /usr/bin/gcc
|
||||
cxx: /usr/bin/g++
|
||||
# - compiler: clang
|
||||
# profile:
|
||||
# version: 14
|
||||
# cc: /usr/bin/clang-14
|
||||
# cxx: /usr/bin/clang++-14
|
||||
- compiler: clang
|
||||
profile:
|
||||
version: 14
|
||||
cc: /usr/bin/clang-14
|
||||
cxx: /usr/bin/clang++-14
|
||||
runs-on: [self-hosted, vanity]
|
||||
container: rippleci/rippled-build-ubuntu:aaf5e3e
|
||||
env:
|
||||
Reference in New Issue
Block a user