Fix nuget authentication #35
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 Pipeline | |
on: | |
push: | |
branches: | |
- development | |
paths-ignore: | |
- ".clang-format" | |
- ".clang-tidy" | |
- ".editorconfig" | |
- ".gitignore" | |
- "README.md" | |
pull_request: | |
branches: | |
- development | |
paths-ignore: | |
- ".clang-format" | |
- ".clang-tidy" | |
- ".editorconfig" | |
- ".gitignore" | |
- "README.md" | |
jobs: | |
build: | |
env: | |
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' | |
VCPKG_DISABLE_METRICS: ON | |
strategy: | |
matrix: | |
os: [ macos-latest, ubuntu-latest, windows-latest ] | |
include: | |
- install_prereqs_cmd: "brew update && brew install doxygen ninja" | |
mono: "mono" | |
os: "macos-latest" | |
triplet: "x64-osx" | |
- install_prereqs_cmd: "sudo apt-get update && sudo apt-get install doxygen ninja-build" | |
mono: "mono" | |
os: "ubuntu-latest" | |
triplet: "x64-linux" | |
- install_prereqs_cmd: "choco install doxygen.install ninja" | |
mono: "" | |
os: "windows-latest" | |
triplet: "x64-windows" | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Install prerequisites | |
run: ${{ matrix.install_prereqs_cmd }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: "Setup NuGet Credentials" | |
run: | | |
${{ matrix.mono }} `$VCPKG_INSTALLATION_ROOT/vcpkg fetch nuget | tail -n 1` \ | |
sources add \ | |
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \ | |
-storepasswordincleartext \ | |
-name "GitHub" \ | |
-username "${{ github.repository_owner }}" \ | |
-password "${{ secrets.GITHUB_TOKEN }}" | |
${{ matrix.mono }} `$VCPKG_INSTALLATION_ROOT/vcpkg fetch nuget | tail -n 1` \ | |
setapikey "${{ secrets.GITHUB_TOKEN }}" \ | |
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" | |
- name: Setup MSVC environment | |
if: runner.os == 'Windows' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Configure | |
env: | |
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} | |
run: cmake --preset "ninja-multi-config" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake | |
- name: Build | |
run: cmake --build --preset "ninja-multi-config-release" | |
- name: Test | |
run: ctest --preset "ninja-multi-config-release" |