From 66f8e7d8785890f8968d092737a569bc1faa9973 Mon Sep 17 00:00:00 2001 From: Braxton Salyer Date: Sat, 15 Jun 2024 22:07:09 -0500 Subject: [PATCH] Update CI --- .github/workflows/cmake.yml | 70 ++++++++++++++++++-------------- .github/workflows/xmake.yml | 79 ++++++++++++++++++++++++------------- CMakeLists.txt | 2 +- 3 files changed, 93 insertions(+), 58 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 4cf14c1..57ae46d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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 @@ -48,16 +60,16 @@ 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 @@ -65,21 +77,21 @@ jobs: - 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 @@ -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 diff --git a/.github/workflows/xmake.yml b/.github/workflows/xmake.yml index d0c0dd8..ef3effc 100644 --- a/.github/workflows/xmake.yml +++ b/.github/workflows/xmake.yml @@ -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 @@ -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: @@ -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 @@ -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 @@ -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: @@ -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 @@ -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 @@ -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: @@ -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 @@ -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 @@ -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 @@ -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 }}" + diff --git a/CMakeLists.txt b/CMakeLists.txt index 65ad957..62c490b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()