Skip to content

IDE-1144 Replace actions/upload-artifact@v3 with v4 #360

IDE-1144 Replace actions/upload-artifact@v3 with v4

IDE-1144 Replace actions/upload-artifact@v3 with v4 #360

Workflow file for this run

name: Test Build
env:
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,read"
VCPKG_NUGET_REPOSITORY: "https://github.com/hpcc-systems/vcpkg"
on:
pull_request:
branches:
- "master"
- "candidate-*"
- "!candidate-7.10.*"
- "!candidate-7.8.*"
- "!candidate-7.6.*"
- "!candidate-7.4.*"
- "!candidate-7.2.*"
- "!candidate-7.0.*"
- "!candidate-6.*"
jobs:
preamble:
name: Preamble
runs-on: ubuntu-22.04
outputs:
folder_platform: ${{ steps.vars.outputs.folder_platform }}
mount_platform: ${{ steps.vars.outputs.mount_platform }}
folder_ln: ${{ steps.vars.outputs.folder_ln }}
mount_ln: ${{ steps.vars.outputs.mount_ln }}
folder_build: ${{ steps.vars.outputs.folder_build }}
mount_build: ${{ steps.vars.outputs.mount_build }}
community_ref: ${{ steps.vars.outputs.community_ref }}
internal_ref: ${{ steps.vars.outputs.internal_ref }}
community_tag: ${{ steps.vars.outputs.community_tag }}
internal_tag: ${{ steps.vars.outputs.internal_tag }}
community_branch: ${{ steps.vars.outputs.community_branch }}
cmake_docker_config: ${{ steps.vars.outputs.cmake_docker_config }}
platform: "1"
platform_testing_do_not_release: ${{ steps.skip_check.outputs.platform }}
include_plugins: ${{ (steps.skip_check.outputs.plugins && 'ON') || 'OFF' }}
steps:
- name: Calculate vars
id: vars
run: |
echo "folder_platform=${{ github.workspace }}/eclide" >> $GITHUB_OUTPUT
echo 'mount_platform=source="${{ github.workspace }}/eclide",target=/hpcc-dev/eclide,type=bind,consistency=cached' >> $GITHUB_OUTPUT
echo "folder_ln=${{ github.workspace }}/LN" >> $GITHUB_OUTPUT
echo 'mount_ln=source="${{ github.workspace }}/LN",target=/hpcc-dev/LN,type=bind,consistency=cached' >> $GITHUB_OUTPUT
echo "folder_build=${{ github.workspace }}/build" >> $GITHUB_OUTPUT
echo 'mount_build=source="${{ github.workspace }}/build",target=/hpcc-dev/build,type=bind,consistency=cached' >> $GITHUB_OUTPUT
community_ref=${{ github.ref }}
echo "community_ref=$community_ref" >> $GITHUB_OUTPUT
echo "internal_ref=${{ github.base_ref }}" >> $GITHUB_OUTPUT
community_tag=$(echo $community_ref | cut -d'/' -f3)
echo "community_tag=$community_tag" >> $GITHUB_OUTPUT
echo "internal_tag=$(echo $community_tag | sed 's/community/internal/')" >> $GITHUB_OUTPUT
community_base_ref=${{ github.event.base_ref || github.ref }}
echo "community_branch=$(echo $community_base_ref | cut -d'/' -f3)" >> $GITHUB_OUTPUT
echo "cmake_docker_config=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF" >> $GITHUB_OUTPUT
- name: Print vars
run: |
echo "${{ toJSON(steps.vars.outputs) }})"
echo "${{ toJSON(steps.skip_check.outputs) }})"
build-bare-metal:
name: Build Bare Metal
needs: preamble
strategy:
matrix:
include:
- os: "windows-2019"
mono: ""
sudo: ""
cmake_config_options: '-G "Visual Studio 16 2019" -A Win32'
cmake_build_options: "--config RelWithDebInfo --parallel $NUMBER_OF_PROCESSORS"
event_name: "schedule"
- os: "windows-2022"
mono: ""
sudo: ""
cmake_config_options: '-G "Visual Studio 17 2022" -A Win32'
cmake_build_options: "--config RelWithDebInfo --parallel $NUMBER_OF_PROCESSORS"
event_name: "pull_request"
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Print vars
shell: "bash"
run: |
echo ${{ matrix.os }}
echo "${{ toJSON(needs.preamble.outputs) }})"
- name: "Remove builtin vcpkg (old)"
working-directory: .
shell: "bash"
run: |
${{ matrix.sudo }} rm -rf "$VCPKG_INSTALLATION_ROOT"
- name: Checkout eclide
uses: actions/[email protected]
with:
ref: ${{ needs.preamble.outputs.community_ref }}
submodules: recursive
path: ./eclide
fetch-depth: 0
- name: "vcpkg Bootstrap"
shell: "bash"
run: |
./eclide/vcpkg/bootstrap-vcpkg.sh
- name: "Setup NuGet credentials"
shell: "bash"
run: |
${{ matrix.mono }} `./eclide/vcpkg/vcpkg fetch nuget | tail -n 1` \
sources add \
-name "GitHub" \
-source "https://nuget.pkg.github.com/hpcc-systems/index.json" \
-storepasswordincleartext \
-username "${{ github.actor }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
- name: CMake Packages
shell: "bash"
run: |
mkdir -p ./eclide/build
cmake -S ./eclide -B ./eclide/build ${{ matrix.cmake_config_options }}
cmake --build ./eclide/build ${{ matrix.cmake_build_options }}
- name: Upload error logs
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.package }}-logs
path: ./build/**/*.log