Skip to content

Update build.yml

Update build.yml #11

Workflow file for this run

# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: build
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
linux-static:
runs-on: ubuntu-latest
steps:
- name: Checkout Skylicht Engine
uses: actions/checkout@v4
with:
repository: skylicht-lab/skylicht-engine
path: skylicht-engine
- name: Checkout Project
uses: actions/checkout@v4
with:
path: hello
- name: Install Dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y libglfw3-dev libopenal-dev libx11-dev
sudo apt remove --purge --auto-remove cmake
wget -q https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5-Linux-x86_64.tar.gz
tar -zxvf cmake-3.15.5-Linux-x86_64.tar.gz
- name: Build Skylicht
run: |
cd skylicht-engine
export PATH="./cmake-3.15.5-Linux-x86_64/bin:$PATH"
cmake -S. -BPrjLinux -DINSTALL_LIBS=ON
cmake --build ./PrjLinux --target install
cp -r ./InstallLibs ../hello
cd ..
- name: Build Project
run: |
cd hello
ls -l
cmake -S. -BPrjLinux
cmake --build ./PrjLinux
cd ..
- name: Package
run: |
cd hello
ls -l Bin
linux-shared:
runs-on: ubuntu-latest
steps:
- name: Checkout Skylicht Engine
uses: actions/checkout@v4
with:
repository: skylicht-lab/skylicht-engine
path: skylicht-engine
- name: Checkout Project
uses: actions/checkout@v4
with:
path: hello
- name: Install Dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y libglfw3-dev libopenal-dev libx11-dev
sudo apt remove --purge --auto-remove cmake
wget -q https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5-Linux-x86_64.tar.gz
tar -zxvf cmake-3.15.5-Linux-x86_64.tar.gz
- name: Build Skylicht
run: |
cd skylicht-engine
export PATH="./cmake-3.15.5-Linux-x86_64/bin:$PATH"
cmake -S. -BPrjLinux -DINSTALL_LIBS=ON -DBUILD_SHARED_LIBS=ON
cmake --build ./PrjLinux --target install
cp -r ./InstallLibs ../hello
cd ..
- name: Build Project
run: |
cd hello
ls -l
cmake -S. -BPrjLinux -DUSE_SKYLICHT_SHARED_LIBS=ON
cmake --build ./PrjLinux
cd ..
- name: Package
run: |
cd hello
ls -l Bin
windows-static:
runs-on: windows-latest
steps:
- name: Checkout Skylicht Engine
uses: actions/checkout@v4
with:
repository: skylicht-lab/skylicht-engine
path: skylicht-engine
- name: Checkout Project
uses: actions/checkout@v4
with:
path: hello
- name: Build Skylicht
run: |
cd skylicht-engine
echo %BUILD_TYPE%
cmake -S . -B ./PrjVisualStudio -G "Visual Studio 17 2022" -A x64 -DINSTALL_LIBS=ON
cmake --build ./PrjVisualStudio --target install
cp -r ./InstallLibs ../hello
cd ..
- name: Build Project
run: |
cd hello
dir
cmake -S . -B ./PrjVisualStudio -G "Visual Studio 17 2022" -A x64
cmake --build ./PrjVisualStudio
cd ..
- name: Package
run: |
cd hello
dir Bin
windows-shared:
runs-on: windows-latest
steps:
- name: Checkout Skylicht Engine
uses: actions/checkout@v4
with:
repository: skylicht-lab/skylicht-engine
path: skylicht-engine
- name: Checkout Project
uses: actions/checkout@v4
with:
path: hello
- name: Build Skylicht
run: |
cd skylicht-engine
echo %BUILD_TYPE%
cmake -S . -B ./PrjVisualStudio -G "Visual Studio 17 2022" -A x64 -DINSTALL_LIBS=ON -DBUILD_SHARED_LIBS=ON
cmake --build ./PrjVisualStudio --target install
cp -r ./InstallLibs ../hello
cd ..
- name: Build Project
run: |
cd hello
dir
cmake -S . -B ./PrjVisualStudio -G "Visual Studio 17 2022" -A x64
cmake --build ./PrjVisualStudio
cd ..
- name: Package
run: |
cd hello
dir Bin