From 1abf257f3fe262a8dc27ccd7d65102e9203a5231 Mon Sep 17 00:00:00 2001 From: Alex Brooke Date: Tue, 7 Jul 2020 00:02:16 -0400 Subject: [PATCH] Add: CI Fix: apt and homebrew CI commands Fix: update bundles location --- .github/workflows/ci.yml | 89 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000000..8cae7fec687 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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/*