Skip to content

Initial set of workflows #1

Initial set of workflows

Initial set of workflows #1

Workflow file for this run

name: Build - Full
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build_native:
runs-on: ${{ matrix.config.runner }}
strategy:
matrix:
config:
- { name: win_x64, runner: windows-latest, os: Windows, arch: x64 }
- { name: win_arm64, runner: windows-latest, os: Windows, arch: arm64 }
- { name: linux_x64, runner: ubuntu-22.04, os: Linux, arch: x64 }
- { name: linux_arm64, runner: ubuntu-22.04, os: Linux, arch: arm64 }
- { name: mac_x64, runner: macos-latest, os: MacOS, arch: x64 }
- { name: mac_arm64, runner: macos-latest, os: MacOS, arch: arm64 }
name: Build - ${{ matrix.config.os }} ${{ matrix.config.arch }}
steps:
- name: Install MSVC ARM64 Tools (Windows ARM64)
if: matrix.config.os == 'Windows' && matrix.config.arch == 'arm64'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: arm64
- name: Install Dependencies (Linux ARM64)
if: matrix.config.os == 'Linux' && matrix.config.arch == 'arm64'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu cmake
- name: Update Submodules
run: git submodule update --init --recursive
- name: Navigate to Submodule
run: cd NativeCode
- name: Build (x64)
if: matrix.config.arch == 'x64'
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
- name: Build (Windows ARM64)
if: matrix.config.os == 'Windows' && matrix.config.arch == 'arm64'
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -A ARM64
cmake --build . --config Release
- name: Build (Linux ARM64)
if: matrix.config.os == 'Linux' && matrix.config.arch == 'arm64'
run: |
mkdir build
cd build
cmake .. -DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
-DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
- name: Build (macOS ARM64)
if: matrix.config.os == 'MacOS' && matrix.config.arch == 'arm64'
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_ARCHITECTURES=arm64
cmake --build . --config Release
- name: List Files
run: ls -R build
- name: Upload (Windows)
if: matrix.config.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: output_${{ matrix.config.name }}
path: |
build/Release/dxil-spirv-c-shared.dll
if-no-files-found: error
- name: Upload (Linux)
if: matrix.config.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: output_${{ matrix.config.name }}
path: |
build/libdxil-spirv-c-shared.so
if-no-files-found: error
- name: Upload (MacOS)
if: matrix.config.os == 'MacOS'
uses: actions/upload-artifact@v4
with:
name: output_${{ matrix.config.name }}
path: |
build/libdxil-spirv-c-shared.dylib
if-no-files-found: error
build_managed:
runs-on: ubuntu-latest
needs: build_native
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal