Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
82e33ed
[Test] Try add control aver build arch for vulkan
Jul 28, 2023
fa907f1
[Fix] Windows test unit
Jul 28, 2023
1b49d1f
[Test] Try passing arch parameter to vsdevenv
Jul 28, 2023
6568b74
[Revert+Fix] Was giving wrong parameter name in action after a change
Jul 28, 2023
a116634
[Update] Cache to false for new test to make sure it's always re-run
Jul 28, 2023
6a2814d
[Fix] Quotes not needed
Jul 28, 2023
ef522b1
[Test] Try adding the arch to cmake
Jul 28, 2023
8f615cf
[Add] Events parameter and try target architecture on every tests
Jul 28, 2023
55db76c
[Test] Revert plat def for Unix + try Win32 when x86 is set for Windows
Jul 28, 2023
bf480f6
[Update] Don't use cache for tests
Jul 28, 2023
06ac096
[Test] Try to apply platform def only to Win + [Fix] Test Vulkan Install
Jul 28, 2023
fb000e0
[Test] Another way to build the arch definition for windows only
Jul 28, 2023
3f5e54f
[Fix] Powershell if syntax
Jul 28, 2023
3babe9f
[Test] Switch to bash
Jul 28, 2023
d4d144b
[Test] Reversing to use Win32 instead of x86
Jul 29, 2023
d85ab36
[Fix] Try fixing the if statement syntax in test + misc
Jul 29, 2023
c28f6e1
[Fix] Try get if statement ouside of with to not redefine arch
Jul 29, 2023
259ffbf
[Test] Fix arch resolve in action too
Jul 29, 2023
3090d21
[Test] Try fix indentation level of env var in action
Jul 29, 2023
d633b90
[Fix] Template requires shell
Jul 29, 2023
fa6dcdc
[Test] Try fixing assignment syntax + changed default ci tests values
Jul 29, 2023
303bfa8
[Fix] Restrict arch resolve to windows in action
Jul 29, 2023
5893775
[Test] Try fix to use id of step to retrieve archResolved value
Jul 29, 2023
03ae95d
[Test] Try using the GITHUB_ENV instead
Jul 29, 2023
3c9bc24
[Update] Unification of setting archResolved in test
Jul 29, 2023
f455ea2
[Fix] Wrongly used the github input instead of action input
Jul 29, 2023
85ad824
[Fix] Forgot to handle the case of x64 Windows...
Jul 29, 2023
e9925a0
Merge branch 'cmake_arch_choice' into main
Jul 30, 2023
a373e91
[Update] Default test values + comments/descriptions
Jul 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 29 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
description: Vulkan SDK Version
required: false
default: latest
arch:
description: Windows only, Target architecture (x64 or Win32)
required: false
default: Win32
jobs:
setup-all-matrix:
if: ${{ github.event.inputs.extra_tests == 'true' || github.event.inputs.extra_tests == 'matrix' }}
Expand Down Expand Up @@ -81,7 +85,7 @@ jobs:
with:
vulkan-config-file: tests/vulkan_sdk_specs/linux.json
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true+
vulkan-use-cache: true
- name: Test Vulkan SDK Install
run: |
echo "Vulkan SDK Version=='$VULKAN_SDK_VERSION'"
Expand Down Expand Up @@ -137,7 +141,7 @@ jobs:
# cmake --build tests/build --config release
# PATH=$PATH:$VULKAN_SDK/bin ./tests/build/test_vulkan
#
setup-windows-with-version-powershell:
setup-windows-with-arch:
if: ${{ contains(github.event.inputs.extra_tests, 'default') }}
runs-on: windows-latest
steps:
Expand All @@ -146,19 +150,34 @@ jobs:
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
vulkan-use-cache: false
arch: ${{ github.event.inputs.arch }}

- name: resolve arch Win32 --> x86 if needed
shell: bash
run: |
if [[ ${{ inputs.arch }} == 'Win32' ]] ; then
echo "resolvedArch=x86" >> $GITHUB_ENV
else
echo "resolvedArch=x64" >> $GITHUB_ENV
fi

- uses: seanmiddleditch/gha-setup-vsdevenv@v4
with:
arch: ${{ env.resolvedArch }}

- name: Test Vulkan SDK Install
shell: powershell
shell: bash
run: |
echo "Vulkan SDK Version=='$env:VULKAN_SDK_VERSION'"
if (!$env:VULKAN_SDK_VERSION) { throw "vulkan sdk install error" }
echo "Vulkan SDK Version==$VULKAN_SDK_VERSION"
if [[ -z "$VULKAN_SDK_VERSION" ]] ; then
echo "vulkan sdk install error"
exit 1
fi
cd tests
cmake -G "Visual Studio 16 2019" -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=.
cmake -A ${{ inputs.arch }} -G "Visual Studio 17 2022" -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=.
cmake --build build --config release
$ENV:PATH="$ENV:PATH;$ENV:VULKAN_SDK/bin"
tail -100 build/CMakeFiles/*.log
PATH="$PATH:$VULKAN_SDK/bin"
./build/test_vulkan
#
setup-macos-with-latest:
Expand All @@ -170,7 +189,7 @@ jobs:
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang
vulkan-use-cache: true+
vulkan-use-cache: true
- name: Test Vulkan SDK Install
run: |
echo "Vulkan SDK Version=='$VULKAN_SDK_VERSION'"
Expand Down
39 changes: 32 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ inputs:
description: 'specify whether to cache VULKAN_SDK/ results between runs (using github actions/cache)'
default: false
required: false
arch:
description: 'Build architecture, Windows only (x64 or Win32)'
default: x64
required: false
runs:
using: "composite"

steps:
- uses: humbletim/vsdevenv-shell@e87fcf2359929606ba32db358baef5ede4737aed

Expand Down Expand Up @@ -88,27 +93,47 @@ runs:
cat $VULKAN_SDK_BUILD_DIR/env
echo "--------------------------------------------------------------"

- name: resolve arch
shell: bash
run: |
# resolve arch to x86 for vsdenv when cmake arch target is Win32 (WINDOWS ONLY); x64 for everything else

if [[ $RUNNER_OS == 'Windows' ]] ; then
echo "Is Windows: true"
if [[ ${{ inputs.arch }} == 'Win32' ]] ; then
echo "resolvedArch=x86" >> $GITHUB_ENV
else
echo "resolvedArch=x64" >> $GITHUB_ENV
fi
else
echo "resolvedArch=x64" >> $GITHUB_ENV
fi

- name: Configure Vulkan SDK Components
if: steps.vulkan-cached-sdk.outputs.cache-hit != 'true'
shell: vsdevenv x64 bash {0}
shell: vsdevenv ${{ env.resolvedArch }} bash {0}
run: |
# cmake configure
set -a
. $PWD/_vulkan_build/env

archParam=""
if [[ $RUNNER_OS == 'Windows' ]] ; then
CC=cl.exe
CXX=cl.exe
archParam="-A ${{ inputs.arch }}"
fi
cmake -S $GITHUB_ACTION_PATH -B ${VULKAN_SDK_BUILD_DIR} \
-DCMAKE_BUILD_TYPE=Release \
-DVULKAN_SDK=${VULKAN_SDK} \
-DVULKAN_SDK_CONFIG="${VULKAN_SDK_CONFIG_FILE}" \
-DVULKAN_SDK_COMPONENTS="${VULKAN_SDK_COMPONENTS}" \

cmake ${archParam} -S $GITHUB_ACTION_PATH -B ${VULKAN_SDK_BUILD_DIR} \
-DCMAKE_BUILD_TYPE=Release \
-DVULKAN_SDK=${VULKAN_SDK} \
-DVULKAN_SDK_CONFIG="${VULKAN_SDK_CONFIG_FILE}" \
-DVULKAN_SDK_COMPONENTS="${VULKAN_SDK_COMPONENTS}" \
|| { cat _vulkan_build/CMakeFiles/*.log ; exit 4 ; }

- name: Build Vulkan SDK Components
if: steps.vulkan-cached-sdk.outputs.cache-hit != 'true'
shell: vsdevenv x64 bash {0}
shell: vsdevenv ${{ env.resolvedArch }} bash {0}
run: |
# cmake build
set -a
Expand Down