Create GitHub workflows #18
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
name: Build project | |
on: [push, pull_request] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
container: ubuntu:18.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Get short SHA | |
id: slug | |
run: echo "::set-output name=sha7::$(git rev-parse --short HEAD)" | |
- name: Update and install packages | |
run: | | |
apt-get -qq update | |
ACCEPT_EULA=Y apt-get -y dist-upgrade | |
apt-get -y install g++ build-essential make autoconf libglfw3-dev libsdl2-image-dev libsdl2-dev libczmq-dev cppcheck | |
- name: Build from makefile | |
working-directory: Project | |
run: | | |
make -j 4 | |
- name: Upload ELF | |
uses: actions/upload-artifact@v2 | |
with: | |
name: meshglide | |
path: Project/MeshGlide | |
build-windows: | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Get short SHA | |
id: slug | |
run: echo "::set-output name=sha7::$(git rev-parse --short HEAD)" | |
- name: Set up vcpkg submodule | |
run: git submodule update --init --recursive | |
- name: Install vcpkg depedencies | |
run: vcpkg integrate install | |
- name: Build the project | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake | |
cmake --build . | |
- name: Create archive | |
run: | | |
cd build | |
zip -r meshglide.zip MeshGlide C:/vcpkg/vcpkg_installed | |
- name: Create artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: meshglide | |
path: meshglide.zip |