Skip to content

Build skshaderc

Build skshaderc #12

Workflow file for this run

name: Build skshaderc
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to build'
type: string
required: true
workflow_call:
inputs:
branch:
description: 'Branch to build'
type: string
required: true
permissions:
contents: write
actions: write
jobs:
###########################################
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
- uses: lukka/[email protected]
- name: Build Native Win32 x64
run: |
cmake --preset skshaderc_Win32_x64_Release
cmake --build --preset skshaderc_Win32_x64_Release
mkdir bin/distribute/win32_x64
copy bin/intermediate/Win32_x64/Release/skshaderc_exe.exe bin/distribute/win32_x64/skshaderc.exe
copy sk_gpu.h bin/distribute/sk_gpu.h
- name: Build Native Win32 Arm64
run: |
cmake --preset skshaderc_Win32_Arm64_Release
cmake --build --preset skshaderc_Win32_Arm64_Release
mkdir bin/distribute/win32_arm64
copy bin/intermediate/Win32_Arm64/Release/skshaderc_exe.exe bin/distribute/win32_arm64/skshaderc.exe
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: binaries
path: bin/distribute/
###########################################
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
- uses: lukka/[email protected]
- name: Install Prerequisites
run: |
sudo apt-get update
sudo apt-get install ninja-build
- name: Build Native Linux x64
run: |
cmake --preset skshaderc_Linux_x64_Release
cmake --build --preset skshaderc_Linux_x64_Release
mkdir -p bin/distribute/linux_x64
cp bin/intermediate/Linux_x64_Release/skshaderc_exe bin/distribute/linux_x64/skshaderc
- name: Install Arm64 Prerequisites
run: |
sudo cp ./cmake/arm-cross-compile-sources-focal.list /etc/apt/sources.list.d/
sudo sed -i "s/deb mirror/deb [arch=amd64] mirror/g" /etc/apt/sources.list
sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu lld:arm64
- name: Build Linux Arm64
run: |
cmake --preset skshaderc_Linux_Arm64_Release
cmake --build --preset skshaderc_Linux_Arm64_Release
mkdir -p bin/distribute/linux_arm64
cp bin/intermediate/Linux_ARM64_Release/skshaderc_exe bin/distribute/linux_arm64/skshaderc
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: binaries
path: bin/distribute/
###########################################
build-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
- uses: lukka/[email protected]
- name: Build Native Mac x64
run: |
cmake --preset skshaderc_Mac_x64_Release
cmake --build --preset skshaderc_Mac_x64_Release
mkdir -p bin/distribute/mac_arm64
cp bin/intermediate/Mac_Arm64_Release/Release/skshaderc_exe bin/distribute/mac_arm64/skshaderc
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: binaries
path: bin/distribute/