Skip to content

Commit

Permalink
ci: update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Mar 14, 2024
1 parent 0f4b7bf commit c599ca3
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: endstone-cpp-plugin-windows
name: example-plugin-windows
path: ./build/*.dll

build_linux:
Expand All @@ -50,24 +50,17 @@ jobs:
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/clang clang /usr/bin/clang-${LLVM_VERSION} 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} 100
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${LLVM_VERSION} 100
sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-${LLVM_VERSION} 100
sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y -q clang-${LLVM_VERSION} 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: |
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
Expand All @@ -76,5 +69,5 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: endstone-cpp-plugin-linux
name: example-plugin-linux
path: ./build/*.so

0 comments on commit c599ca3

Please sign in to comment.