Skip to content

now with build cache and proper vcpkg access in the linux container #8

now with build cache and proper vcpkg access in the linux container

now with build cache and proper vcpkg access in the linux container #8

Workflow file for this run

name: CI
on:
push:
branches: ["master", "_master/add_ci"]
pull_request:
branches: ["master"]
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
#
# Linux
#
linux-prepare:
name: Prepare Linux Container
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-linux-container
linux-test:
name: Linux Test (${{ matrix.compiler }}-release)
needs: linux-prepare
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [gcc]
steps:
- name: Free Disk Space
run: |
sudo rm -rf /usr/local/lib/android
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Linux Env
uses: ./.github/actions/setup-linux
with:
compiler: ${{ matrix.compiler }}
# Vcpkg cache
- name: Cache vcpkg installed
uses: actions/cache@v4
with:
path: |
vcpkg_installed
key: vcpkg-installed-linux-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-installed-linux-${{ matrix.compiler }}-
- name: Configure
uses: ./.github/actions/run-linux
with:
run: |
cp ci/CMakeUserPresets.json CMakeUserPresets.json
cmake --preset ci_${{ matrix.compiler }}_af_cpu
- name: Build
uses: ./.github/actions/run-linux
with:
run: cmake --build --preset linux_${{ matrix.compiler }}_af_cpu_ci_build_test
- name: Test
uses: ./.github/actions/run-linux
with:
run: ctest --test-dir out/build/ci_${{ matrix.compiler }}_af_cpu -C Release --output-on-failure
- name: Fix permissions
if: always()
run: sudo chown -R $(id -u):$(id -g) out/build
#
# Windows
#
windows-test:
name: Windows Test (${{ matrix.compiler }})
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
compiler: [msvc]
# clang on windows skipped for simplicity unless requested, cth had it.
# Keeping msvc only to save CI time/complexity initially.
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
# Install Core Dependencies (Legacy/Manual Integration)
# Using ArrayFire as standard backend config
- uses: ./.github/actions/install_core_deps
with:
backend: ArrayFire
distributed_backend: Stub
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: "pip"
cache-dependency-path: ".github/requirements.txt"
- name: Install CMake & Ninja
shell: pwsh
run: |
pip install --upgrade -r .github/requirements.txt
- name: Setup Windows Env
uses: ./.github/actions/setup-windows
with:
compiler: ${{ matrix.compiler }}
- name: Configure
shell: pwsh
run: |
Copy-Item ci/CMakeUserPresets.json CMakeUserPresets.json
cmake --preset ci_msvc_af_cpu
- name: Build
shell: pwsh
run: |
cmake --build --preset win_msvc_af_cpu_ci_build_test
- name: Test
shell: pwsh
run: |
ctest --test-dir out/build/ci_msvc_af_cpu -C Release --output-on-failure