Release Windows #25
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: Release Windows | |
# yamllint disable rule:line-length | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: cmd | |
jobs: | |
MSVC: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2022-Readme.md | |
os: [windows-2022] | |
triplet: [x64-windows, x86-windows] | |
include: | |
- os: windows-2022 | |
triplet: x64-windows | |
# https://github.com/microsoft/vcpkg/commit/8eb57355a4ffb410a2e94c07b4dca2dffbee8e50 | |
vcpkgCommitId: '8eb57355a4ffb410a2e94c07b4dca2dffbee8e50' | |
vcpkgPackages: 'cairo expat fontconfig freetype gettext glib libpng libxml2 pango pcre zlib' | |
configuration: 'x64' | |
nmake_configuration: 'USE_64BIT=1' | |
- os: windows-2022 | |
triplet: x86-windows | |
vcpkgCommitId: '8eb57355a4ffb410a2e94c07b4dca2dffbee8e50' | |
vcpkgPackages: 'cairo expat fontconfig freetype gettext glib libpng libxml2 pango pcre zlib' | |
configuration: 'x86' | |
nmake_configuration: '' | |
env: | |
buildDir: '${{ github.workspace }}/build/' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
# Restore from cache the previously built ports. If cache-miss, download and build vcpkg (aka "bootstrap vcpkg"). | |
- name: Restore from cache and install vcpkg | |
# Download and build vcpkg. | |
uses: lukka/run-vcpkg@v7 | |
with: | |
setupOnly: false | |
# Location of vcpkg in the Git repository. | |
vcpkgDirectory: '${{ github.workspace }}/vcpkg' | |
vcpkgGitCommitId: '${{ matrix.vcpkgCommitId}}' | |
vcpkgTriplet: ${{ matrix.triplet }} | |
vcpkgArguments: '${{ matrix.vcpkgPackages }}' | |
# Ensure the vcpkg artifacts are cached, they are generated in the 'CMAKE_BINARY_DIR/vcpkg_installed' directory. | |
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed | |
- name: Build ${{ matrix.configuration }} | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.configuration }} | |
nmake -f win32\Makefile_vcpkg.msc ${{ matrix.nmake_configuration }} | |
- name: Collect files | |
run: | | |
win32\collect_rrdtool_vcpkg_files.bat ${{ matrix.configuration }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: deploy-rrdtool-MSVC-${{ matrix.configuration }} | |
path: win32/nmake_release_${{ matrix.configuration }}_vcpkg/rrdtool-*-${{ matrix.configuration }}_vcpkg/ |