Skip to content

Update build_docs.yml with image rl-manylinux-2_28-build:latest #897

Update build_docs.yml with image rl-manylinux-2_28-build:latest

Update build_docs.yml with image rl-manylinux-2_28-build:latest #897

Workflow file for this run

name: Windows Nuget
on:
push:
tags:
- '*'
branches:
- master
- 'releases/**'
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
build_nuget_windows:
name: nuget.${{ matrix.toolset }}-${{ matrix.build_type }}
runs-on: ${{matrix.os}}
strategy:
matrix:
os: ["windows-2019"]
build_type: ["Debug", "Release"]
toolset: ["v141", "v142"]
steps:
# Get repository and setup dependencies
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: ilammy/msvc-dev-cmd@v1
# NASM required to compile OpenSSL assembly language code
- uses: ilammy/setup-nasm@v1
- name: Dependencies
# cd .. to change out of directory with vcpkg.json manifest file
run: >
cd ..;
vcpkg install
--host-triplet=x64-windows
--triplet=x64-windows
flatbuffers
boost-filesystem
boost-thread
boost-program-options
boost-test
boost-align
boost-math
boost-uuid
boost-system
boost-date-time
boost-regex
boost-asio
boost-interprocess
# Get version number
- name: Update git tags
# Needed because actions/checkout performs a shallow checkout without tags
run: git fetch --unshallow --tags --recurse-submodules=no
- name: Get version number
id: get_version
shell: bash
run: |
version=$(./.scripts/version_number.py)
echo "Generated version number: $version"
echo "version=$version" >> $GITHUB_OUTPUT
# Compile code and create package
- name: Configure
run: >
cmake -S . -B build
-G "Visual Studio 16 2019" -A x64
-T ${{ matrix.toolset }}
-DVCPKG_MANIFEST_MODE=Off
-DRL_BUILD_NUGET=On
-DRL_NUGET_PACKAGE_NAME=RLClientLibNativeStatic
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DRL_NUGET_PACKAGE_VERSION="${{ steps.get_version.outputs.version }}"
-DNATIVE_NUGET_PLATFORM_TAG=x64
-DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_INSTALLATION_ROOT}\scripts\buildsystems\vcpkg.cmake"
-DVCPKG_TARGET_TRIPLET=x64-windows
-Drlclientlib_BUILD_DOTNET=Off
- name: Compile
run: cmake --build ./build --config ${{ matrix.build_type }} -v
- name: Create Nuget package
run: cmake --install ./build --config ${{ matrix.build_type }} --prefix ./nuget_staging -v
# Upload the package
- name: Get file name
id: nuget_name
shell: bash
run: |
cd nuget_staging
ls
NugetFileName=(*.nupkg)
echo "Found nuget package: ${NugetFileName[0]}"
echo "NugetFileName=${NugetFileName[0]}" >> $GITHUB_OUTPUT
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: RLClientLibNativeStatic-${{ matrix.toolset }}-${{ matrix.build_type }}-x64.${{ steps.get_version.outputs.version }}.nupkg
path: nuget_staging/${{ steps.nuget_name.outputs.NugetFileName }}
test_nuget_windows:
needs: [build_nuget_windows]
name: nuget-test.${{ matrix.toolset }}-${{ matrix.build_type }}
runs-on: ${{matrix.os}}
strategy:
matrix:
os: ["windows-2019"]
build_type: ["Debug", "Release"]
toolset: ["v141", "v142"]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: ilammy/msvc-dev-cmd@v1
- name: Add msbuild to PATH
uses: microsoft/[email protected]
# Get version number
- name: Update git tags
# Needed because actions/checkout performs a shallow checkout without tags
run: git fetch --unshallow --tags --recurse-submodules=no
- name: Get version number
id: get_version
shell: bash
run: |
version=$(./.scripts/version_number.py)
echo "Generated version number: $version"
echo "version=$version" >> $GITHUB_OUTPUT
# Download and install nuget
- uses: actions/download-artifact@v4
with:
name: RLClientLibNativeStatic-${{ matrix.toolset }}-${{ matrix.build_type }}-x64.${{ steps.get_version.outputs.version }}.nupkg
path: downloaded_nugets
- name: List downloaded files
run: ls downloaded_nugets
- name: Install nuget
run: >
nuget install
-Source "${{ github.workspace }}\downloaded_nugets"
-OutputDirectory "${{ github.workspace }}\nuget\test\packages"
-Version "${{ steps.get_version.outputs.version }}"
-Verbosity detailed
-NonInteractive
RLClientLibNativeStatic-${{ matrix.toolset }}-${{ matrix.build_type }}-x64
- name: Rename package install directory to omit version number
run: |
cd nuget\test\packages
mv * RLClientLibNativeStatic-${{ matrix.toolset }}-${{ matrix.build_type }}-x64
# Compile and run
- name: Build test
run: |
cd nuget\test
msbuild test_rl_nuget.vcxproj -t:rebuild "-property:Configuration=${{ matrix.build_type }};Platform=x64;PlatformToolset=${{ matrix.toolset }}"
.\bin\x64\${{ matrix.build_type }}\test_rl_nuget.exe