refactor: rename to endstone_cpp_example #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build_windows: | |
name: Build on Windows | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x86_64 | |
- name: Set up CMake and Ninja | |
uses: lukka/get-cmake@latest | |
- name: Build with CMake | |
run: | | |
mkdir build | |
cd build | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo .. | |
cmake --build . | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: example-plugin-windows | |
path: | | |
./build/*_plugin.dll | |
./build/*_plugin.pdb | |
build_linux: | |
name: Build on Ubuntu | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up Clang 15 | |
env: | |
LLVM_VERSION: 15 | |
run: | | |
sudo apt-get update -y -q | |
sudo apt-get install -y -q lsb-release wget software-properties-common gnupg | |
sudo wget https://apt.llvm.org/llvm.sh | |
sudo chmod +x llvm.sh | |
sudo ./llvm.sh ${LLVM_VERSION} | |
sudo apt-get install -y -q libc++-${LLVM_VERSION}-dev libc++abi-${LLVM_VERSION}-dev | |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${LLVM_VERSION} 100 | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${LLVM_VERSION} 100 | |
- name: Set up CMake and Ninja | |
uses: lukka/get-cmake@latest | |
- name: Build with CMake | |
run: | | |
mkdir build | |
cd build | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo .. | |
cmake --build . | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: example-plugin-linux | |
path: ./build/*_plugin.so |