Skip to content
name: Refresh GH environments NuGet cache
env:
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"
on:
push:
branches:
- "hpcc-platform-9.8.x"
workflow_call:
inputs:
branch:
description: "The branch to build"
required: true
type: string
workflow_dispatch:
jobs:
build:
strategy:
matrix:
label:
[
"ubuntu-20.04-x64",
"ubuntu-22.04-x64",
"windows-2019-x64",
"windows-2022-x64",
"macos-12-x64",
"macos-13-x64"
]
include:
- label: "ubuntu-20.04-x64"
os: "ubuntu-20.04"
triplet: "x64-linux-dynamic"
mono: "mono"
sudo: "sudo"
- label: "ubuntu-22.04-x64"
os: "ubuntu-22.04"
triplet: "x64-linux-dynamic"
mono: "mono"
sudo: "sudo"
- label: "windows-2019-x64"
os: "windows-2019"
triplet: "x64-windows"
mono: ""
sudo: ""
- label: "windows-2022-x64"
os: "windows-2022"
triplet: "x64-windows"
mono: ""
sudo: ""
- label: "macos-12-x64"
os: "macos-12"
triplet: "x64-osx"
mono: "mono"
sudo: "sudo"
- label: "macos-13-x64"
os: "macos-13"
triplet: "x64-osx"
mono: "mono"
sudo: "sudo"
fail-fast: false
name: "GH Environment - ${{ matrix.label }}"
runs-on: ${{ matrix.os }}
steps:
- name: Ubuntu Dependencies
if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'ubuntu-22.04' }}
shell: "bash"
run: |
sudo apt-get update -y
sudo apt-get install -yq --no-install-recommends \
apt-transport-https \
autoconf \
autoconf-archive \
automake \
autotools-dev \
binutils-dev \
bison \
build-essential \
ca-certificates \
curl \
dirmngr \
flex \
git \
gnupg \
groff-base \
libtool \
pkg-config \
software-properties-common \
tar \
unzip \
uuid-dev \
zip
- name: Ubuntu Mono Dependencies
if: ${{ matrix.os == 'ubuntu-22.04' }}
shell: "bash"
run: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get update -y
sudo apt-get -yq install -f mono-complete
- name: OSX Dependencies
if: ${{ matrix.os == 'macos-12' || matrix.os == 'macos-13' }}
shell: "bash"
run: |
brew install bison flex pkg-config automake libtool autoconf autoconf-archive coreutils
- name: Check out source code
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.branch || github.ref }}
- name: "Bootstrap vcpkg"
working-directory: .
shell: "bash"
run: |
./bootstrap-vcpkg.sh
- name: "Setup NuGet Credentials"
working-directory: .
shell: "bash"
run: |
${{ matrix.mono }} `./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 fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: "Update nuget (overlays)"
working-directory: .
shell: "bash"
run: |
./vcpkg install \
--x-abi-tools-use-exact-versions \
--host-triplet=${{ matrix.triplet }} \
--triplet=${{ matrix.triplet }}
- name: Upload error logs
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-logs
path: ./**/*.log