Skip to content

Update cmake-compile.yml #8

Update cmake-compile.yml

Update cmake-compile.yml #8

Workflow file for this run

name: CMake Compile
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Install Clang (Linux)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y clang
- name: Configure CMake (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
export CC=clang
export CXX=clang++
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Configure CMake (Windows)
if: matrix.os == 'windows-latest'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${env.BUILD_TYPE}
- name: Upload Artifact (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: disableme_windows
path: ${{github.workspace}}/build/Release/endstone_disable_me.dll
- name: Upload Artifact (Linux)
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: disableme_linux
path: ${{github.workspace}}/build/endstone_disable_me.so