Skip to content

Stop release of shared library for cert_dtrace #963

Stop release of shared library for cert_dtrace

Stop release of shared library for cert_dtrace #963

Workflow file for this run

name: CMake Build
on:
pull_request:
types: [opened, synchronize]
branches: main-ge
schedule:
# Run workflow night at 5 AM UTC (10PM PST)
- cron: '0 5 * * *'
workflow_dispatch:
# see binary-caching-github-actions-cache
env:
VCPKG_BINARY_SOURCES: "clear;nuget,https://pkgs.dev.azure.com/vcpkg/public/_packaging/public/nuget/v3/index.json,readwrite"
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout AIEBU
uses: actions/checkout@v4
with:
submodules: recursive
# See binary caching with github actions
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install Dependencies (Linux) and configure CMake
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libelf-dev libboost-dev pylint elfutils
python -m pip install --upgrade pip
pip install pyyaml jinja2 Markdown pylint colorama gitPython wrapt
cmake -B ${{github.workspace}}/build/Release \
-DCMAKE_BUILD_TYPE=Release -DAIEBU_PYTHON=ON
- name: Save Python Path for ise with CMake
if: runner.os == 'Windows'
run: |
$python_path = (Get-Command python3).path
echo "PYTHON_EXECUTABLE=$python_path"
echo "PYTHON_EXECUTABLE=$python_path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache vcpkg packages
if: runner.os == 'Windows'
uses: actions/cache@v4
with:
path: |
C:\vcpkg\installed
C:\vcpkg\buildtrees
C:\vcpkg\downloads
key: vcpkg-${{ runner.os }}-${{ matrix.os }}-${{ hashFiles('**/vcpkg.json') }}
restore-keys: |
vcpkg-${{ runner.os }}-${{ matrix.os }}-
vcpkg-${{ runner.os }}-
- name: Install Dependencies (Windows) and configure CMake
if: runner.os == 'Windows'
run: |
$isArm64 = "${{ matrix.os }}" -eq "windows-11-arm"
$triplet = if ($isArm64) { 'arm64-windows' } else { 'x64-windows' }
vcpkg install --triplet=$triplet
# install python dependencies
python -m pip install --upgrade pip
python -m pip install pyyaml jinja2 Markdown pylint colorama gitPython wrapt
# configure cmake specifying path to python
$cmakeArgs = @(
"-B", "${{github.workspace}}/build/WBuild",
"-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake",
"-DCMAKE_BUILD_TYPE=Release",
"-DPython3_EXECUTABLE=${{ env.PYTHON_EXECUTABLE }}",
"-DAIEBU_PYTHON=ON"
)
if ($isArm64) {
$cmakeArgs += "-A", "ARM64", "-DCMAKE_SYSTEM_PROCESSOR=ARM64"
}
cmake @cmakeArgs
- name: Build (Linux)
if: runner.os == 'Linux'
run: |
cmake --build ${{github.workspace}}/build/Release --config Release -j 4
- name: Build (Windows)
if: runner.os == 'Windows'
run: |
cmake --build ${{github.workspace}}/build/WBuild --config Release -j 4
- name: Install (Linux)
if: runner.os == 'Linux'
run: |
# Specify staging install area specific to Linux.
# Binary dir (Release) is specific to configuration.
# The unittest cmake_test test requires opt/xilinx/aiebu staging area
cmake --install ${{github.workspace}}/build/Release --config Release --prefix ${{github.workspace}}/build/Release/opt/xilinx/aiebu
- name: Install (Windows)
if: runner.os == 'Windows'
run: |
# Specify staging install area specific to Windows.
# Multi-config build setup, binary dir (WBuild) is shared.
# The unittest cmake_test test requires Release/xilinx/aiebu staging area
cmake --install ${{github.workspace}}/build/WBuild --config Release --prefix ${{github.workspace}}/build/WBuild/Release/xilinx/aiebu
- name: Test (Linux)
if: runner.os == 'Linux'
run: |
cmake --build ${{github.workspace}}/build/Release --config Release --target test -j 4
- name: Test (Windows)
if: runner.os == 'Windows'
run: |
cmake --build ${{github.workspace}}/build/WBuild --config Release --target run_tests -j 4
- name: Package (Linux)
if: runner.os == 'Linux'
run: |
cpack -G TGZ -B ${{github.workspace}}/build/Release -C Release --config ${{github.workspace}}/build/Release/CPackConfig.cmake
- name: Package (Windows)
if: runner.os == 'Windows'
run: |
cpack -G ZIP -B ${{github.workspace}}/build/WBuild -C Release --config ${{github.workspace}}/build/WBuild/CPackConfig.cmake
- name: Upload (Linux)
if: runner.os == 'Linux' && (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
uses: actions/upload-artifact@v4
with:
name: aiebu_release_${{ matrix.os }}
path: ${{github.workspace}}/build/Release/AIEBU-*-Linux.tar.gz
- name: Upload (Windows)
if: runner.os == 'Windows' && (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
uses: actions/upload-artifact@v4
with:
name: aiebu_release_${{ matrix.os }}
path: ${{github.workspace}}/build/WBuild/AIEBU-*-win64.zip
retention-days: 7