Skip to content

Commit

Permalink
build: Update CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aqnuep committed Nov 30, 2023
1 parent da4d12e commit d8c0028
Showing 1 changed file with 40 additions and 72 deletions.
112 changes: 40 additions & 72 deletions .github/workflows/build_sc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ concurrency:
cancel-in-progress: true

on:
push:
branches-ignore:
- main
pull_request:
branches:
- sc_main
push:
branches-ignore:
- main
pull_request:
branches:
- sc_main

permissions: read-all

Expand All @@ -50,8 +50,8 @@ jobs:
cxx: g++

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- uses: lukka/get-cmake@latest
Expand All @@ -77,21 +77,19 @@ jobs:
working-directory: ./build
run: ctest --output-on-failure

- name: Verify generated source files
run: python scripts/generate_source.py --verify external/${{matrix.config}}/Vulkan-Headers/registry --api vulkansc

- name: Verify code formatting with clang-format
run: ./scripts/check_code_format.sh

- name: Verify commit message formatting
run: ./scripts/check_commit_message_format.sh
codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: scripts/update_deps.py --dir ext --no-build
- run: scripts/generate_source.py --verify ext/Vulkan-Headers/registry/ --api vulkansc

linux-no-asm:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- uses: lukka/get-cmake@latest
Expand Down Expand Up @@ -130,8 +128,8 @@ jobs:
cxx: g++

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- uses: lukka/get-cmake@latest
Expand Down Expand Up @@ -169,8 +167,8 @@ jobs:
linux-32-no-asm:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- uses: lukka/get-cmake@latest
Expand Down Expand Up @@ -210,8 +208,8 @@ jobs:
config: [ Debug, Release ]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.7'

Expand All @@ -235,8 +233,8 @@ jobs:
arch: [ Win32, x64 ]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.7'

Expand Down Expand Up @@ -267,8 +265,8 @@ jobs:
config: debug

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -293,8 +291,8 @@ jobs:
config: [ Release ]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -320,7 +318,7 @@ jobs:
strategy:
matrix:
config: [ Debug, Release ]
os: [ macos-11, macos-latest ]
os: [ macos-11, macos-12 ]
static_build: [ BUILD_STATIC_LOADER=ON, BUILD_STATIC_LOADER=OFF ]
exclude:
- os: macos-latest
Expand All @@ -330,54 +328,24 @@ jobs:
static_build: BUILD_STATIC_LOADER=ON

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- uses: lukka/get-cmake@latest
- name: Generate build files
run: cmake -S. -B build -D CMAKE_BUILD_TYPE=${{matrix.config}} -D ${{matrix.static_build}} -D BUILD_TESTS=ON -D UPDATE_DEPS=ON -D ENABLE_WERROR=ON -D LOADER_ENABLE_ADDRESS_SANITIZER=ON -G "Ninja" -D VULKANSC=ON
env:
# Specify the minimum version of macOS on which the target binaries are to be deployed.
# https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html
MACOSX_DEPLOYMENT_TARGET: 10.12
LDFLAGS: -Wl,-fatal_warnings

- name: Build the loader
run: cmake --build build
- run: cmake --build build

- name: Install the loader
run: cmake --install build --prefix build/install
- run: cmake --install build --prefix build/install

- name: Run regression tests
working-directory: ./build
run: ctest --output-on-failure

mac-no-asm:
runs-on: macos-latest

strategy:
matrix:
static_build: [ BUILD_STATIC_LOADER=ON, BUILD_STATIC_LOADER=OFF ]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.7'
- uses: lukka/get-cmake@latest
- name: Generate build files
run: cmake -S. -B build -D CMAKE_BUILD_TYPE=Release -D ${{matrix.static_build}} -D BUILD_TESTS=ON -D UPDATE_DEPS=ON -D ENABLE_WERROR=ON -D USE_GAS=OFF -G "Ninja" -D VULKANSC=ON
env:
# Specify the minimum version of macOS on which the target binaries are to be deployed.
# https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html
MACOSX_DEPLOYMENT_TARGET: 10.12

- name: Build the loader
run: cmake --build build

- name: Run regression tests
working-directory: ./build
run: ctest --output-on-failure -E UnknownFunction


mingw:
Expand All @@ -386,7 +354,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
Expand All @@ -404,7 +372,7 @@ jobs:
- name: UASM Check
run: uasm -?
- name: Configure
run: cmake -S. -B build -D UPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=Release
run: cmake -S. -B build -D UPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=Release -D VULKANSC=ON
env:
LDFLAGS: -fuse-ld=lld # MINGW linking is very slow. Use llvm linker instead.
CMAKE_C_COMPILER_LAUNCHER: ccache
Expand All @@ -423,7 +391,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
Expand All @@ -436,7 +404,7 @@ jobs:
run: gcc --version # If this fails MINGW is not setup correctly
- name: Configure
# Make sure this doesn't fail even without -D USE_MASM=OFF and without uasm
run: cmake -S. -B build -D UPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=Release
run: cmake -S. -B build -D UPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=Release -D VULKANSC=ON
env:
LDFLAGS: -fuse-ld=lld # MINGW linking is very slow. Use llvm linker instead.
CMAKE_C_COMPILER_LAUNCHER: ccache
Expand All @@ -455,7 +423,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
Expand All @@ -467,7 +435,7 @@ jobs:
- name: GCC Version
run: gcc --version # If this fails MINGW is not setup correctly
- name: Configure
run: cmake -S. -B build -D UPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=Release -D ENABLE_WERROR=ON -D USE_MASM=OFF
run: cmake -S. -B build -D UPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=Release -D ENABLE_WERROR=ON -D USE_MASM=OFF -D VULKANSC=ON
env:
LDFLAGS: -fuse-ld=lld # MINGW linking is very slow. Use llvm linker instead.
CMAKE_C_COMPILER_LAUNCHER: ccache
Expand Down

0 comments on commit d8c0028

Please sign in to comment.