Skip to content

Commit

Permalink
Use builtin LLVM and add setup job.
Browse files Browse the repository at this point in the history
  • Loading branch information
crud89 committed Dec 13, 2024
1 parent 209a9a7 commit ef8a81d
Showing 1 changed file with 69 additions and 9 deletions.
78 changes: 69 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ on:
env:
vulkanSdkVersion: '1.3.283.0'
mesaDriverVersion: '24.1.1'
llvmVersion: '19'

# The following jobs are contained in this workflow:
# - First, the `verify-permissions` job is executed. It checks if the comment user is a contributer or maintainer and if the comment refers to a pull request. It then parses the
Expand Down Expand Up @@ -92,10 +93,69 @@ jobs:
comment-id: ${{ github.event.comment.id }}
reactions: 'rocket'

# Test job.
# ------------------------------------- Toolchain setup -------------------------------------
setup:
name: run-setup
needs: verify
if: ${{ contains(needs.verify.outputs.commands, 'test') || contains(needs.verify.outputs.commands, 'tidy') }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: true
matrix:
name: [ windows-latest ]
include:
- name: windows-latest
os: windows-latest
#- name: ubuntu-latest
# os: ubuntu-latest

steps:
- name: Setup Vulkan SDK
uses: jakoch/install-vulkan-sdk-action@v1.0.4
with:
vulkan_version: ${{ env.vulkanSdkVersion }}
install_runtime: true
cache: true
stripdown: true

- name: Lookup Mesa3D cache
uses: actions/cache@v4
id: lookup-mesa
with:
key: ${{ matrix.os }}-mesa3d-${{ env.mesaDriverVersion }}
path: ${{ github.workspace }}/dep/mesa/
lookup-only: true

- name: Download Mesa3D driver
uses: robinraju/release-downloader@v1.10
if: steps.lookup-mesa.outputs.cache-hit != 'true'
with:
repository: 'pal1000/mesa-dist-win'
tag: '${{ env.mesaDriverVersion }}'
fileName: 'mesa3d-${{ env.mesaDriverVersion }}-release-msvc.7z'
out-file-path: 'dep/mesa/' # ${{ github.workspace }} is prefixed automatically.
extract: false # 7zip is not supported by this extension, so we have to do it on our own later.

- name: Decompress Mesa3D driver
working-directory: '${{ github.workspace }}/dep/mesa/'
if: steps.lookup-mesa.outputs.cache-hit != 'true'
shell: bash
run: |
7z x '${{ github.workspace }}/dep/mesa/mesa3d-${{ env.mesaDriverVersion }}-release-msvc.7z'
rm '${{ github.workspace }}/dep/mesa/mesa3d-${{ env.mesaDriverVersion }}-release-msvc.7z'
- name: Cache Mesa3D
uses: actions/cache/save@v4
if: steps.lookup-mesa.outputs.cache-hit != 'true'
with:
path: ${{ github.workspace }}/dep/mesa/
key: ${{ matrix.os }}-mesa3d-${{ env.mesaDriverVersion }}

# ------------------------------------- Test job -------------------------------------
test:
name: run-tests
needs: verify
needs: [ verify, setup ]
if: ${{ contains(needs.verify.outputs.commands, 'test') }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
Expand Down Expand Up @@ -168,7 +228,7 @@ jobs:
submodules: true

- name: Setup Vulkan SDK
uses: jakoch/install-vulkan-sdk-action@v1.0.0
uses: jakoch/install-vulkan-sdk-action@v1.0.4
with:
vulkan_version: ${{ env.vulkanSdkVersion }}
install_runtime: true
Expand All @@ -186,7 +246,7 @@ jobs:
if: ${{ matrix.compiler == 'clang' }}
uses: KyleMayes/install-llvm-action@v2
with:
version: "19"
version: ${{ env.llvmVersion }}

- name: Setup build and test environment
id: setup-environment
Expand Down Expand Up @@ -303,13 +363,13 @@ jobs:
output: |
{ "summary": ${{ toJSON(env.SUMMARY) }} }
# Run static code analysis
# ------------------------------------- Static code analysis -------------------------------------
tidy:
name: run-tidy
needs: verify
needs: [ verify, setup ]
if: ${{ contains(needs.verify.outputs.commands, 'tidy') }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -373,7 +433,7 @@ jobs:
submodules: true

- name: Setup Vulkan SDK
uses: jakoch/install-vulkan-sdk-action@v1.0.0
uses: jakoch/install-vulkan-sdk-action@v1.0.4
with:
vulkan_version: ${{ env.vulkanSdkVersion }}
install_runtime: true
Expand All @@ -384,7 +444,7 @@ jobs:
if: ${{ matrix.compiler == 'clang' }}
uses: KyleMayes/install-llvm-action@v2
with:
version: "19"
version: ${{ env.llvmVersion }}

- name: Setup build and test environment
id: setup-environment
Expand Down

0 comments on commit ef8a81d

Please sign in to comment.