chore: bump version to 9.11.2 (#4909) #4608
This file contains hidden or 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: Native Nugets | |
| on: | |
| push: | |
| 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.arch_config.arch }} | |
| runs-on: ${{matrix.os}} | |
| outputs: | |
| version: ${{ steps.get_version.outputs.version }} | |
| strategy: | |
| matrix: | |
| os: ["windows-2022"] | |
| toolset: ["v142", "v143"] | |
| arch_config: | |
| - { arch: x64, generator_arch: x64} | |
| steps: | |
| # Get repository and setup dependencies | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: false | |
| - name: Init submodules with retry | |
| shell: bash | |
| run: | | |
| git config --global --add safe.directory "$(pwd)" | |
| for attempt in 1 2 3 4 5; do | |
| if git submodule update --init --recursive; then | |
| echo "Submodule init succeeded on attempt $attempt" | |
| exit 0 | |
| fi | |
| echo "Attempt $attempt failed, retrying in 15s..." | |
| sleep 15 | |
| done | |
| echo "Submodule init failed after 5 attempts" | |
| exit 1 | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| # 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=$(./utl/version_number.py) | |
| echo "Generated version number: $version" | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| # Compile code | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build | |
| -G "Visual Studio 17 2022" -A ${{ matrix.arch_config.generator_arch }} | |
| -T ${{ matrix.toolset }} | |
| -DVW_NUGET_PACKAGE_VERSION="${{ steps.get_version.outputs.version }}" | |
| -DNATIVE_NUGET_PLATFORM_TAG="${{ matrix.arch_config.arch }}" | |
| -DVW_FEAT_FLATBUFFERS=Off | |
| -DBUILD_TESTING=Off | |
| -DRAPIDJSON_SYS_DEP=Off | |
| -DFMT_SYS_DEP=Off | |
| -DSPDLOG_SYS_DEP=Off | |
| -DVW_ZLIB_SYS_DEP=Off | |
| -DVW_BOOST_MATH_SYS_DEP=Off | |
| -DVW_BUILD_VW_C_WRAPPER=Off | |
| -DVW_INSTALL=On | |
| -DCMAKE_POLICY_VERSION_MINIMUM=3.5 | |
| - name: Build and install | |
| run: | | |
| cmake --build build --config Debug -t vw_io vw_core vw_cli_bin vw_allreduce vw_spanning_tree_bin vw_c_wrapper vw_cache_parser vw_text_parser vw_json_parser | |
| cmake --build build --config Release -t vw_io vw_core vw_cli_bin vw_allreduce vw_spanning_tree_bin vw_c_wrapper vw_cache_parser vw_text_parser vw_json_parser | |
| # Install debug first so that release overwrites the exe and nothing else | |
| cmake --install build --prefix ./nuget_staging --config Debug | |
| cmake --install build --prefix ./nuget_staging --config Release | |
| # Create package | |
| - if: ${{ matrix.arch_config.arch == 'x64' }} | |
| run: cp nuget\native\vowpalwabbit-x64.targets nuget_staging\vowpalwabbit.targets | |
| - name: Package | |
| shell: powershell | |
| id: generate-nuget | |
| run: | | |
| cp build\nuget\native\vowpalwabbit.nuspec nuget_staging\vowpalwabbit.nuspec | |
| cd nuget_staging | |
| nuget pack .\vowpalwabbit.nuspec | |
| $NugetFileName = Get-ChildItem *.nupkg -name | |
| echo "NugetFileName=$NugetFileName" >> $GITHUB_OUTPUT | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: VowpalWabbitNative-${{matrix.toolset}}-x64.${{ steps.get_version.outputs.version }}.nupkg | |
| path: nuget_staging/${{ steps.generate-nuget.outputs.NugetFileName }} | |
| retention-days: ${{ github.event_name == 'pull_request' && 7 || 400 }} | |
| test_nuget_windows: | |
| needs: [build_nuget_windows] | |
| name: nuget-test.${{ matrix.toolset }} | |
| runs-on: ${{matrix.os}} | |
| strategy: | |
| matrix: | |
| os: ["windows-2022"] | |
| toolset: ["v142", "v143"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: false | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v1.1 | |
| # Download and install nuget (version from build job) | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: VowpalWabbitNative-${{matrix.toolset}}-x64.${{ needs.build_nuget_windows.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\native\test\packages" | |
| -Version "${{ needs.build_nuget_windows.outputs.version }}" | |
| -Verbosity detailed | |
| -NonInteractive | |
| VowpalWabbitNative-${{ matrix.toolset }}-x64 | |
| - name: Rename package install directory to omit version number | |
| run: | | |
| cd nuget\native\test\packages | |
| mv * VowpalWabbitNative-${{ matrix.toolset }}-x64 | |
| # Compile and run | |
| - name: Test nuget | |
| run: | | |
| cd nuget\native\test | |
| echo "Testing debug build..." | |
| msbuild test-${{ matrix.toolset }}.vcxproj -t:rebuild "-property:Configuration=Debug;Platform=x64" | |
| .\bin\x64\Debug\test-${{ matrix.toolset }}.exe | |
| echo "Testing release build..." | |
| msbuild test-${{ matrix.toolset }}.vcxproj -t:rebuild "-property:Configuration=Release;Platform=x64" | |
| .\bin\x64\Release\test-${{ matrix.toolset }}.exe |