Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
braxtons12 committed Jun 16, 2024
1 parent 9c0c773 commit 66f8e7d
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 58 deletions.
70 changes: 40 additions & 30 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,52 @@ on:
branches: ["*"]

jobs:
build-linux-gcc-13-x64:
linux-gcc-x64:
runs-on: ubuntu-latest
strategy:
matrix:
version: [12, 13]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4

- name: Install Toolchains PPA
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get -y update
- name: Install GCC
run: sudo apt-get -y install gcc-${{matrix.version}} g++-${{matrix.version}}

- name: Configure
env:
CC: gcc-13
CXX: gcc-13
CC: gcc-${{matrix.version}}
CXX: g++-${{matrix.version}}
working-directory: ${{github.workspace}}
run: cmake --preset env-cc-release

- name: Build
env:
CC: gcc-13
CXX: gcc-13
CC: gcc-${{matrix.version}}
CXX: g++-${{matrix.version}}
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: cmake --build --preset env-cc-release

- name: Test
env:
CC: gcc-13
CXX: gcc-13
CC: gcc-${{matrix.version}}
CXX: g++-${{matrix.version}}
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: ctest --preset env-cc-release --verbose

build-linux-clang-16-x64:
linux-clang-x64:
runs-on: ubuntu-latest
strategy:
matrix:
version: [15, 16, 17, 18]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -48,38 +60,38 @@ jobs:
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16
sudo apt-get -y install clang-tidy-16
sudo ./llvm.sh ${{matrix.version}}
sudo apt-get -y install clang-tidy-${{matrix.version}}
- name: Replace clang-tidy
run: sudo cp /usr/bin/clang-tidy-16 /usr/bin/clang-tidy -f
run: sudo cp /usr/bin/clang-tidy-${{matrix.version}} /usr/bin/clang-tidy -f

- name: Configure
env:
CC: clang-16
CXX: clang-16
CC: clang-${{matrix.version}}
CXX: clang++-${{matrix.version}}
working-directory: ${{github.workspace}}
run: |
rm -rf build
cmake --preset env-cc-release
- name: Build
env:
CC: clang-16
CXX: clang-16
CC: clang-${{matrix.version}}
CXX: clang++-${{matrix.version}}
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: cmake --build --preset env-cc-release

- name: Test
env:
CC: clang-16
CXX: clang-16
CC: clang-${{matrix.version}}
CXX: clang++-${{matrix.version}}
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: ctest --preset env-cc-release --verbose

build-windows-msvc-x64:
windows-msvc-x64:
runs-on: windows-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -116,38 +128,36 @@ jobs:
working-directory: ${{github.workspace}}
run: ctest --preset msvc-release --verbose

build-macos-clang-15-x64:
macos-clang-x64:
runs-on: macos-latest
strategy:
matrix:
version: [15, 16, 17, 18]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "15.0"
- name: Install LLVM
run: |
brew install llvm@${{matrix.version}}
echo "PATH=$(brew --prefix llvm@${{matrix.version}})/bin:$PATH" >> $GITHUB_ENV
echo "CC=$(brew --prefix llvm@${{matrix.version}})/bin/clang" >> $GITHUB_ENV
echo "CXX=$(brew --prefix llvm@${{matrix.version}})/bin/clang++" >> $GITHUB_ENV
echo "LDFLAGS='-L$(brew --prefix llvm@${{matrix.version}})/lib/c++ -Wl,-rpath,$(brew --prefix llvm@${{matrix.version}})/lib/c++'" >> $GITHUB_ENV
- name: Configure
env:
CC: clang-15
CXX: clang-15
working-directory: ${{github.workspace}}
run: cmake --preset env-cc-release

- name: Build
env:
CC: clang-15
CXX: clang-15
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: cmake --build --preset env-cc-release

- name: Test
env:
CC: clang-15
CXX: clang-15
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: ctest --preset env-cc-release --verbose
Expand Down
79 changes: 52 additions & 27 deletions .github/workflows/xmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ on:
branches: ["*"]

jobs:
build-linux-gcc-13-x64:
linux-gcc-x64:
runs-on: ubuntu-latest
strategy:
matrix:
version: [12, 13]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -19,9 +21,17 @@ jobs:
sudo apt-get -y update
sudo apt-get -y install xmake
- name: Install Toolchains PPA
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get -y update
- name: Install GCC
run: sudo apt-get -y install gcc-${{matrix.version}} g++-${{matrix.version}}

- name: Configure
working-directory: ${{github.workspace}}
run: xmake f -c -y --toolchain=gcc-13
run: xmake f -c -y --toolchain=gcc-${{matrix.version}} --hyperion_enable_tracy=y

- name: Build
env:
Expand All @@ -33,7 +43,7 @@ jobs:
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test
run: xmake test -vD

- name: Extract branch name
shell: bash
Expand All @@ -46,12 +56,14 @@ jobs:
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=gcc-13 "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=gcc-13 --configs="hyperion_enable_tracy=true" "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=gcc-${{matrix.version}} "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=gcc-${{matrix.version}} --configs="hyperion_enable_tracy=true" "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"
build-linux-clang-16-x64:
linux-clang-x64:
runs-on: ubuntu-latest
strategy:
matrix:
version: [15, 16, 17, 18]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -67,17 +79,17 @@ jobs:
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16
sudo apt-get -y install clang-tidy-16
sudo ./llvm.sh ${{matrix.version}}
sudo apt-get -y install clang-tidy-${{matrix.version}}
- name: Replace clang-tidy
run: sudo cp /usr/bin/clang-tidy-16 /usr/bin/clang-tidy -f
run: sudo cp /usr/bin/clang-tidy-${{matrix.version}} /usr/bin/clang-tidy -f

- name: Configure
working-directory: ${{github.workspace}}
run: |
rm -rf build .xmake
xmake f -c -y --toolchain=clang-16
xmake f -c -y --toolchain=clang-${{matrix.version}} --hyperion_enable_tracy=y
- name: Build
env:
Expand All @@ -91,7 +103,7 @@ jobs:
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test
run: xmake test -vD

- name: Extract branch name
shell: bash
Expand All @@ -104,10 +116,10 @@ jobs:
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=clang-16 "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang-16 --configs="hyperion_enable_tracy=true" "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang-${{matrix.version}} "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang-${{matrix.version}} --configs="hyperion_enable_tracy=true" "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"
build-windows-msvc-x64:
windows-msvc-x64:
runs-on: windows-latest
strategy:
fail-fast: false
Expand All @@ -129,11 +141,16 @@ jobs:
arch: x64

- name: Install XMake
run: scoop install xmake
run: |
scoop install xmake
xmake update -sfy master
Start-Sleep -Seconds 2
xmake update -fy master
- name: Configure
working-directory: ${{github.workspace}}
run: xmake f -c -y --toolchain=msvc
run: |
xmake f -c -y --toolchain=msvc --hyperion_enable_tracy=y
- name: Build
env:
Expand All @@ -145,7 +162,7 @@ jobs:
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test
run: xmake test -vD

- name: Extract branch name
shell: bash
Expand All @@ -158,12 +175,14 @@ jobs:
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=msvc "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=msvc --configs="hyperion_enable_tracy=true" "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=msvc "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=msvc --configs="hyperion_enable_tracy=true" "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"
build-macos-xcode-x64:
runs-on: macos-latest
macos-clang-x64:
runs-on: macos-13
strategy:
matrix:
version: [15, 16, 17, 18]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -175,25 +194,30 @@ jobs:
brew install xmake
- name: Install LLVM
run: xrepo install -y llvm
run: |
brew install llvm@${{matrix.version}}
echo "PATH=$(brew --prefix llvm@${{matrix.version}})/bin:$PATH" >> $GITHUB_ENV
echo "CC=$(brew --prefix llvm@${{matrix.version}})/bin/clang" >> $GITHUB_ENV
echo "CXX=$(brew --prefix llvm@${{matrix.version}})/bin/clang++" >> $GITHUB_ENV
echo "LDFLAGS='-L$(brew --prefix llvm@${{matrix.version}})/lib/c++ -Wl,-rpath,$(brew --prefix llvm@${{matrix.version}})/lib/c++'" >> $GITHUB_ENV
- name: Configure
working-directory: ${{github.workspace}}
run: xmake f -c -y --toolchain=xcode
run: xmake f -c -y --toolchain=clang --hyperion_enable_tracy=y

- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: |
xmake b -y
xmake b
xmake check clang.tidy
- name: Test
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test
run: xmake test -vD

- name: Extract branch name
shell: bash
Expand All @@ -206,5 +230,6 @@ jobs:
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=xcode "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=xcode --configs="hyperion_enable_tracy=true" "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang --configs="hyperion_enable_tracy=true" "hyperion_platform ${{ steps.extract_branch.outputs.branch }}"
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endif()
if(${HYPERION_USE_FETCH_CONTENT})
FetchContent_Declare(hyperion_platform
GIT_REPOSITORY "https://github.com/braxtons12/hyperion_platform"
GIT_TAG "v0.3.1"
GIT_TAG "v0.4.0"
)
FetchContent_MakeAvailable(hyperion_platform)
else()
Expand Down

0 comments on commit 66f8e7d

Please sign in to comment.