mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-09-01 17:29:18 +02:00
appveyor: add Linux build
This commit is contained in:
107
appveyor.yml
107
appveyor.yml
@@ -1,44 +1,89 @@
|
|||||||
version: '{build}'
|
version: '{build}'
|
||||||
image: Visual Studio 2022
|
|
||||||
|
# Build on both Windows and Linux
|
||||||
|
image:
|
||||||
|
- Visual Studio 2022
|
||||||
|
- Ubuntu2004
|
||||||
|
|
||||||
# Używamy własnych kroków build
|
# Używamy własnych kroków build
|
||||||
build: off
|
build: off
|
||||||
|
|
||||||
# Zmienna z konfiguracją
|
# Zmienna z konfiguracją (Windows)
|
||||||
environment:
|
environment:
|
||||||
CONFIG: RelWithDebInfo
|
CONFIG: RelWithDebInfo
|
||||||
|
|
||||||
init:
|
# Per-image build steps: Windows uses cmd:, Linux uses sh:
|
||||||
- cmd: |
|
for:
|
||||||
echo Build worker: %APPVEYOR_BUILD_WORKER_IMAGE%
|
|
||||||
ver
|
|
||||||
|
|
||||||
install:
|
# ------------------------------------------------------------------ Windows
|
||||||
- cmd: |
|
- matrix:
|
||||||
git submodule update --init --recursive
|
only:
|
||||||
call setup-ci.bat
|
- image: Visual Studio 2022
|
||||||
|
|
||||||
before_build:
|
init:
|
||||||
- cmd: |
|
- cmd: |
|
||||||
if not exist build mkdir build
|
echo Build worker: %APPVEYOR_BUILD_WORKER_IMAGE%
|
||||||
cd build
|
ver
|
||||||
cmake .. -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=%CONFIG% -DPython3_ROOT_DIR=C:/Python314-x64
|
|
||||||
|
|
||||||
build_script:
|
install:
|
||||||
- cmd: |
|
- cmd: |
|
||||||
cmake --build . --config %CONFIG% --parallel
|
git submodule update --init --recursive
|
||||||
cd ..
|
call setup-ci.bat
|
||||||
|
|
||||||
after_build:
|
before_build:
|
||||||
- cmd: |
|
- cmd: |
|
||||||
echo Copying shaders...
|
if not exist build mkdir build
|
||||||
if not exist build\bin\%CONFIG%\shaders mkdir build\bin\%CONFIG%\shaders
|
cd build
|
||||||
xcopy /E /Y shaders build\bin\%CONFIG%\shaders\
|
cmake .. -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=%CONFIG% -DPython3_ROOT_DIR=C:/Python314-x64
|
||||||
|
|
||||||
artifacts:
|
build_script:
|
||||||
- path: build\bin\%CONFIG%\*.exe
|
- cmd: |
|
||||||
name: binaries
|
cmake --build . --config %CONFIG% --parallel
|
||||||
- path: build\pdb\%CONFIG%\*.pdb
|
cd ..
|
||||||
name: symbols
|
|
||||||
- path: build\bin\%CONFIG%\shaders
|
after_build:
|
||||||
name: shaders
|
- cmd: |
|
||||||
|
echo Copying shaders...
|
||||||
|
if not exist build\bin\%CONFIG%\shaders mkdir build\bin\%CONFIG%\shaders
|
||||||
|
xcopy /E /Y shaders build\bin\%CONFIG%\shaders\
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
- path: build\bin\%CONFIG%\*.exe
|
||||||
|
name: binaries
|
||||||
|
- path: build\pdb\%CONFIG%\*.pdb
|
||||||
|
name: symbols
|
||||||
|
- path: build\bin\%CONFIG%\shaders
|
||||||
|
name: shaders
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------ Linux
|
||||||
|
- matrix:
|
||||||
|
only:
|
||||||
|
- image: Ubuntu2004
|
||||||
|
|
||||||
|
init:
|
||||||
|
- sh: |
|
||||||
|
echo "Build worker: $APPVEYOR_BUILD_WORKER_IMAGE"
|
||||||
|
uname -a
|
||||||
|
|
||||||
|
install:
|
||||||
|
- sh: |
|
||||||
|
git submodule update --init --recursive
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get install -y libglfw3-dev python3-dev libpng-dev libopenal-dev libluajit-5.1-dev libserialport-dev libsndfile1-dev
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- sh: |
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_ZMQ=OFF -DWITH_OPENVR=OFF -DUSE_LTO=ON
|
||||||
|
cmake --build . --parallel
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
after_build:
|
||||||
|
- sh: |
|
||||||
|
mkdir -p build/bin/shaders
|
||||||
|
cp -r shaders/. build/bin/shaders/ || true
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
- path: build/bin
|
||||||
|
name: binaries_linux
|
||||||
|
|||||||
Reference in New Issue
Block a user