Skip to content

V1 Routing API

V1 Routing API #373

Workflow file for this run

name: Basic library (ipfs_client) build
on:
pull_request:
release:
types: [created]
jobs:
prechecks:
runs-on: ubuntu-latest
steps:
- name: Checkout ipfs_chromium
uses: actions/checkout@v4
with:
path: 'ipfs_chromium'
- name: Run Unit Tests
run: ./ipfs_chromium/.github/ut.sh
- name: Tour de IPFS
run: ./ipfs_chromium/.github/tour.sh
- name: Upload coverage reports to Codecov.com
uses: codecov/codecov-action@v3
with:
files: build/library/cov.info
build:
name: ${{ matrix.config.name }}
needs: [prechecks]
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true
matrix:
config:
- {
name: "macOS",
os: macos-latest,
build_type: "Release",
cc: "clang",
cxx: "clang++",
generators: "Ninja"
}
- {
name: "Ubuntu",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc",
cxx: "g++",
generators: "Ninja"
}
- {
name: "Ubuntu-Debug",
os: ubuntu-latest,
build_type: "Debug",
cc: "gcc",
cxx: "g++",
generators: "Ninja"
}
- {
name: "Windows-MSVC",
os: windows-latest,
build_type: "Release",
cc: "cl",
cxx: "cl",
generators: "Visual Studio 17 2022"
}
steps:
- uses: actions/checkout@v3
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
pwd
git status
which python3
python3 --version
- name: Install dependencies on Ubuntu
if: startsWith(matrix.config.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install --yes cmake ninja-build doxygen
ninja --version
cmake --version
g++ --version
- name: Install dependencies on macos
if: startsWith(matrix.config.os, 'macos')
shell: bash
run: |
brew install cmake ninja
ninja --version
cmake --version
which c++
which clang++
c++ --version
clang++ --version
/usr/bin/clang++ --version
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade conan
conan profile detect
conan profile show
conan profile path default
grep -n . `conan profile path default`
echo "compiler=apple-clang" >> `conan profile path default`
echo "compiler.cppstd=20" >> `conan profile path default`
echo "compiler.libcxx=libc++" >> `conan profile path default`
echo "compiler.version=14.0" >> `conan profile path default`
conan profile show
- name: Install dependencies on Windows
if: startsWith(matrix.config.os, 'windows')
run: |
choco install ninja cmake
python3 -m pip install --upgrade pip
python3 -m pip install conan
conan profile detect
Copy-Item ".\.github\msvc.profile" -Destination "C:\Users\runneradmin\.conan2\profiles\default"
ninja --version
cmake --version
conan --version
- name: Configure
shell: bash
run: |
mkdir build
mkdir ipfs-client-dev
cmake \
-G "${{ matrix.config.generators }}" \
-S . \
-B build \
-D CMAKE_INSTALL_PREFIX=`pwd`/ipfs-client-dev \
-D CMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-D USE_DOXYGEN=OFF \
-D CXX_VERSION=20
- name: Build
shell: bash
run: cmake --build build --config ${{ matrix.config.build_type }} --target package
- name: Upload to release
if: github.event_name == 'release' && matrix.config.build_type == 'Release'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
cd build
python3 ../cmake/release.py --library-only