Files
IACore/.github/workflows/ci.yaml
2025-12-22 00:49:46 +05:30

71 lines
1.9 KiB
YAML

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-linux-and-wasm:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/i-a-s/iabuild-env:latest
strategy:
fail-fast: false
matrix:
target: [linux-x64, linux-arm64, wasm]
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake --preset ${{ matrix.target }}
- name: Build
run: cmake --build --preset ${{ matrix.target }} --config Release
build-windows:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
target: [windows-x64, windows-arm64]
steps:
- uses: actions/checkout@v4
- name: Upload Error Log
if: always() # Run even if the build failed
uses: actions/upload-artifact@v4
with:
name: error-log
path: D:\a\IACore\IACore\out\build\windows-x64\vcpkg_installed\vcpkg\blds\detect_compiler\config-windows-x64-clang-out.log
- name: Setup VCPKG
run: |
git clone https://github.com/microsoft/vcpkg.git C:/vcpkg
C:/vcpkg/bootstrap-vcpkg.bat
echo "VCPKG_ROOT=C:/vcpkg" >> $env:GITHUB_ENV
- uses: ilammy/setup-nasm@v1
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: out/build/${{ matrix.target }}/vcpkg_installed
key: vcpkg-${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('vcpkg.json') }}
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake --preset ${{ matrix.target }}
cmake --build --preset ${{ matrix.target }} --config Debug
- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@v3