Dev/azure oauth #892
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build RLClientLib | |
on: | |
push: | |
branches: | |
- master | |
- 'releases/**' | |
pull_request: | |
branches: | |
- '*' | |
env: | |
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg_binary_cache | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
build-ubuntu: | |
# Ubuntu build has ONNX extension and Valgrind test | |
name: rlclientlib-${{ matrix.build_type }}-ubuntu-latest | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [debug, release] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- run: git -C ${{ github.workspace }}/ext_libs/vcpkg fetch --unshallow | |
- uses: lukka/get-cmake@latest | |
- name: Install ONNX | |
run: | | |
ONNX_FILENAME="onnxruntime-linux-x64-1.13.1" | |
wget "https://github.com/microsoft/onnxruntime/releases/download/v1.13.1/$ONNX_FILENAME.tgz" | |
tar xvf "$ONNX_FILENAME.tgz" | |
echo "ONNXRUNTIME_ROOT=$ONNX_FILENAME" >> $GITHUB_ENV | |
- run: echo "VCPKG_COMMIT=$(git rev-parse :ext_libs/vcpkg)" >> $GITHUB_ENV | |
- run: mkdir -p ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
- uses: actions/cache@v3 | |
env: | |
cache-name: vcpkg-cache | |
with: | |
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}/* | |
key: ubuntu-latest-build-${{ env.cache-name }}-${{ hashFiles('vcpkg.json') }}-${{ env.VCPKG_COMMIT }}" | |
- uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/ext_libs/vcpkg' | |
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json" | |
- name: Configure | |
run: > | |
cmake -S . -B build -G Ninja | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/ext_libs/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
-DFMT_SYS_DEP=ON | |
-DSPDLOG_SYS_DEP=ON | |
-Drlclientlib_BUILD_ONNXRUNTIME_EXTENSION=ON | |
-DONNXRUNTIME_ROOT="${{ github.workspace }}/${{ env.ONNXRUNTIME_ROOT }}" | |
- name: Build | |
run: | | |
cmake --build build | |
- name: Test | |
run: | | |
cd build | |
ctest --verbose --output-on-failure | |
- name: Test with Valgrind | |
run: | | |
cd build | |
sudo apt-get update -y | |
sudo apt install -y valgrind | |
valgrind --quiet --error-exitcode=100 --undef-value-errors=no --leak-check=full ./unit_test/rltest -- valgrind | |
build-macos: | |
# Mac build doesn't have any additional features enabled | |
name: rlclientlib-${{ matrix.build_type }}-macos-latest | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [debug, release] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- run: git -C ${{ github.workspace }}/ext_libs/vcpkg fetch --unshallow | |
- uses: lukka/get-cmake@latest | |
- run: echo "VCPKG_COMMIT=$(git rev-parse :ext_libs/vcpkg)" >> $GITHUB_ENV | |
shell: bash | |
- run: mkdir -p ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
- uses: actions/cache@v3 | |
env: | |
cache-name: vcpkg-cache | |
with: | |
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}/* | |
key: macos-latest-build-${{ env.cache-name }}-${{ hashFiles('vcpkg.json') }}-${{ env.VCPKG_COMMIT }}" | |
- uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/ext_libs/vcpkg' | |
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json" | |
- name: Configure | |
run: > | |
cmake -S . -B build -G Ninja | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/ext_libs/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
-DFMT_SYS_DEP=ON | |
-DSPDLOG_SYS_DEP=ON | |
- name: Build | |
run: | | |
cmake --build build | |
- name: Test | |
run: | | |
cd build | |
ctest --verbose --output-on-failure | |
build-windows: | |
# Windows build has C# bindings | |
name: rlclientlib-${{ matrix.build_type }}-windows-latest | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [debug, release] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- run: git -C ${{ github.workspace }}/ext_libs/vcpkg fetch --unshallow | |
- name: Setup MSVC Developer Command Prompt | |
uses: ilammy/msvc-dev-cmd@v1 | |
- uses: lukka/get-cmake@latest | |
- name: Install dotnet t4 | |
run: dotnet tool install --global dotnet-t4 | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '3.1.x' | |
- run: echo "VCPKG_COMMIT=$(git rev-parse :ext_libs/vcpkg)" >> $GITHUB_ENV | |
shell: bash | |
- run: mkdir -p ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
- uses: actions/cache@v3 | |
env: | |
cache-name: vcpkg-cache | |
with: | |
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}/* | |
key: windows-latest-build-${{ env.cache-name }}-${{ hashFiles('vcpkg.json') }}-${{ env.VCPKG_COMMIT }}" | |
- uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/ext_libs/vcpkg' | |
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json" | |
- name: Configure | |
run: > | |
cmake -S . -B build -G Ninja | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/ext_libs/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
-DFMT_SYS_DEP=ON | |
-DSPDLOG_SYS_DEP=ON | |
- name: Build | |
run: | | |
cmake --build build | |
- name: Test | |
run: | | |
cd build | |
ctest --verbose --output-on-failure |