forked from JGRennison/OpenTTD-patches
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: apt and homebrew CI commands Fix: update bundles location
- Loading branch information
1 parent
641e682
commit 1abf257
Showing
1 changed file
with
89 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ jgrpp ] | ||
pull_request: | ||
branches: [ jgrpp ] | ||
|
||
jobs: | ||
build_linux: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: prepare workspace | ||
run: mkdir build | ||
- name: install dependencies | ||
run: "sudo apt-get install -y zlib1g-dev liblzo2-dev liblzma-dev libpng-dev libfreetype6-dev libfontconfig1-dev libicu-dev libsdl2-dev" | ||
- name: cmake | ||
run: | | ||
pushd build | ||
cmake .. | ||
popd | ||
- name: make package | ||
run: | | ||
pushd build | ||
make package | ||
popd | ||
- name: upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: linux | ||
path: build/bundles/* | ||
|
||
build_macos: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: prepare workspace | ||
run: mkdir build | ||
- name: brew update | ||
run: "brew update" | ||
- name: install dependencies | ||
run: "brew install zlib lzo xz libpng freetype fontconfig icu4c sdl2" | ||
- name: cmake | ||
run: | | ||
pushd build | ||
cmake .. | ||
popd | ||
- name: make package | ||
run: | | ||
pushd build | ||
make package | ||
popd | ||
- name: upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: macOS | ||
path: build/bundles/* | ||
|
||
build_windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: prepare workspace | ||
run: mkdir build | ||
- name: set up vcpkg and install dependencies # should probably cache this but whatever | ||
run: | | ||
git clone --depth 1 https://github.com/Microsoft/vcpkg.git | ||
pushd vcpkg | ||
.\bootstrap-vcpkg.bat | ||
.\vcpkg.exe install liblzma:x64-windows-static libpng:x64-windows-static lzo:x64-windows-static zlib:x64-windows-static | ||
popd | ||
- name: cmake | ||
run: | | ||
pushd build | ||
cmake.exe .. -G'Visual Studio 16 2019' -DCMAKE_TOOLCHAIN_FILE="..\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static" | ||
popd | ||
- name: make package | ||
run: | | ||
pushd build | ||
cmake.exe --build . --target PACKAGE --config RelWithDebInfo | ||
popd | ||
- name: upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: win64 | ||
path: build/bundles/* |