Skip to content

Use the same case for json calls throughout #2

Use the same case for json calls throughout

Use the same case for json calls throughout #2

Workflow file for this run

name: Linux Build

Check failure on line 1 in .github/workflows/linux-build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/linux-build.yml

Invalid workflow file

(Line: 21, Col: 21): Unexpected symbol: '+'. Located at position 15 within expression: fromJson('["' + join(FromJson('["${{ inputs.build-types }}"]'), '","') + '"]'), (Line: 21, Col: 21): Unexpected value '${{ fromJson('["' + join(FromJson('["${{ inputs.build-types }}"]'), '","') + '"]') }}'
on:
workflow_call:
inputs:
project:
required: true
type: string
build-types:
required: false
type: string
default: Debug
jobs:
linux-build:
runs-on: [self-hosted, linux]
strategy:
fail-fast: false
matrix:
build-type: ${{ fromJson('["' + join(FromJson('["${{ inputs.build-types }}"]'), '","') + '"]') }}
steps:
- uses: actions/checkout@v4
with:
submodules: false
repository: novusengine/${{ inputs.project }}
# - name: Setup premake
# uses: abel0b/setup-premake@v2.4
# with:
# version: "5.0.0-beta1"
# - name: Install dependencies
# run: |
# sudo apt-get update && sudo apt-get install -yq clang libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libvulkan-dev
# sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100
# - name: Install Vulkan SDK
# run: |
# wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
# sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
# sudo apt update
# sudo apt install vulkan-sdk
- name: Checkout submodules
run: |
git submodule update --init --recursive
- name: Run Premake
run: |
export VULKAN_SDK=/usr/include/vulkan
premake5 gmake2
- name: Build Meta Generator files
run: |
cd Build
make -j$(nproc) -k Gen-Meta
- name: Set paths
run: |
if [ "${{ inputs.project }}" = "Engine" ]; then
echo "META_DIR=Source/Meta/Meta" >> $GITHUB_ENV
echo "BIN_DIR=Build/Bin/${{ inputs.project }}/${{ matrix.build-type }}" >> $GITHUB_ENV
else
echo "META_DIR=Submodules/Engine/Source/Meta/Meta" >> $GITHUB_ENV
echo "BIN_DIR=Build/Bin/${{ inputs.project }}/Engine/${{ matrix.build-type }}" >> $GITHUB_ENV
fi
- name: Run Meta Generator
run: |
rm -rf $META_DIR/Generated
$BIN_DIR/TypeGenerator $META_DIR/Source $META_DIR/Generated
- name: Re-run Premake
run: |
export VULKAN_SDK=/usr/include/vulkan
premake5 gmake2
- name: Build
run: |
cd Build
make -j$(nproc) -k