Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI #1

Open
wants to merge 5 commits into
base: jgrpp
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
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:
Copy link

@BasicBeluga BasicBeluga Jul 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was testing this build, did not work for me. Its complaining about how it can't find the OpenGFX set, even though I have it installed. When I tried running the executable inside the package directly (vs running as the .app folder) it worked 😕 . Maybe it's some weird new macOS security thing? I'm on vacation right now so sadly I don't have a ton of time to look into this, but I'll see what I can do!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's possible you will need to de-quarantine it yeah. the "simplest" way i found in the past was to xattr -r -d com.apple.quarantine ~/Downloads/bundle.app, but iirc you can also command click it to get the gatekeeper prompt. it's also possible you'll need to change the security setting to allow unsigned apps or downloaded apps to run

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not much we can do about it from this end without a signing key

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's also possible of course that this is not the problem at all. i can test this on a vm later

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"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was having some difficulties compiling a version of this for Enjineer a few months ago, brew seemed to be installing only dynamic libs. The executable works on my machine because I have the libraries installed, but I'm thinking this might not work for people who don't have these libraries installed. I have access to a non-brew'ed machine, so I'll give it a test later today.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm yeah, i'm not sure how to get homebrew to use static libs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and i have a feeling the same issue will happen with linux

- 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/*