Skip to content

Merge pull request #15 from braxtons12/update_ci #190

Merge pull request #15 from braxtons12/update_ci

Merge pull request #15 from braxtons12/update_ci #190

Workflow file for this run

name: XMake
on:
push:
branches: ["*"]
jobs:
linux-gcc-x64:
runs-on: ubuntu-latest
strategy:
matrix:
version: [13]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Install XMake
run: |
sudo add-apt-repository ppa:xmake-io/xmake
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-${{matrix.version}} --hyperion_enable_tracy=y
- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake b
- name: Test
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test -vD
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Install Package
env:
ACTIONS_STEP_DEBUG: true
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=gcc-${{matrix.version}} "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=gcc-${{matrix.version}} --configs="hyperion_enable_tracy=true" "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
linux-clang-x64:
runs-on: ubuntu-latest
strategy:
matrix:
version: [16, 17, 18]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Install XMake
run: |
sudo add-apt-repository ppa:xmake-io/xmake
sudo apt-get -y update
sudo apt-get -y install xmake
- name: Install LLVM and Clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
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-${{matrix.version}} /usr/bin/clang-tidy -f
- name: Configure
working-directory: ${{github.workspace}}
run: |
rm -rf build .xmake
xmake f -c -y --toolchain=clang-${{matrix.version}} --hyperion_enable_tracy=y
- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: |
xmake b
xmake check clang.tidy
- name: Test
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test -vD
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Install Package
env:
ACTIONS_STEP_DEBUG: true
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=clang-${{matrix.version}} "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang-${{matrix.version}} --configs="hyperion_enable_tracy=true" "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
windows-msvc-x64:
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Setup scoop
uses: MinoruSekine/setup-scoop@v2
with:
buckets: extras
scoop_checkup: true
scoop_update: true
update_path: true
- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
- name: 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 --hyperion_enable_tracy=y
- name: Build
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake b
- name: Test
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test -vD
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Install Package
env:
ACTIONS_STEP_DEBUG: true
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 }}"
macos-clang-x64:
runs-on: macos-13
strategy:
matrix:
version: [16, 17, 18]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@v4
- name: Install XMake
run: |
brew update
brew install xmake
- 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
working-directory: ${{github.workspace}}
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
xmake check clang.tidy
- name: Test
env:
ACTIONS_STEP_DEBUG: true
working-directory: ${{github.workspace}}
run: xmake test -vD
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Install Package
env:
ACTIONS_STEP_DEBUG: true
run: |
xrepo add-repo -y hyperion "https://github.com/braxtons12/hyperion_packages.git"
xrepo update-repo -y
xrepo install -y --toolchain=clang "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"
xrepo install -y --toolchain=clang --configs="hyperion_enable_tracy=true" "hyperion_mpl ${{ steps.extract_branch.outputs.branch }}"