summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2020-05-05 10:47:29 -0700
committerWouter van Oortmerssen <aardappel@gmail.com>2020-05-05 13:56:37 -0700
commitf12cca8bcb017618773aaa0f19623f44168bd57a (patch)
treeffe4bc03c233077ac07bbba162c64c503e2c7d0c /.github
parent7e4124d6e6ccafb267f80f3e57e3780913d5cbe5 (diff)
downloadflatbuffers-f12cca8bcb017618773aaa0f19623f44168bd57a.tar.gz
flatbuffers-f12cca8bcb017618773aaa0f19623f44168bd57a.tar.bz2
flatbuffers-f12cca8bcb017618773aaa0f19623f44168bd57a.zip
Attempt at adding Github Actions CI
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml88
1 files changed, 88 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..270ffbc9
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,88 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ build-linux:
+ name: Build Linux
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ cxx: [g++-9, clang++-9]
+ steps:
+ - uses: actions/checkout@v1
+ - name: cmake
+ run: CXX=${{ matrix.cxx }} cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .
+ - name: build
+ run: make -j4
+ - name: test
+ run: ./flattests
+ - name: upload build artifacts
+ uses: actions/upload-artifact@v1
+ with:
+ name: Linux flatc binary ${{ matrix.cxx }}
+ path: flatc
+
+ build-windows:
+ name: Build Windows
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: Add msbuild to PATH
+ uses: microsoft/setup-msbuild@v1.0.0
+ - name: cmake
+ run: cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release .
+ - name: build
+ run: msbuild.exe FlatBuffers.sln /p:Configuration=Release /p:Platform=x64
+ - name: test
+ run: Release\flattests.exe
+ - name: upload build artifacts
+ uses: actions/upload-artifact@v1
+ with:
+ name: Windows flatc binary
+ path: Release\flatc.exe
+
+ build-mac:
+ name: Build Mac
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: cmake
+ run: cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Release .
+ - name: build
+ run: xcodebuild -toolchain clang -configuration Release -target flattests
+ - name: test
+ run: Release/flattests
+ - name: upload build artifacts
+ uses: actions/upload-artifact@v1
+ with:
+ name: Mac flatc binary
+ path: Release/flatc
+
+
+# FIXME: to make this work, this apparently needs:
+# - a newer version of gradle in build.gradle (e.g. 3.2.1)
+# - google() in the repos in build.gradle
+# - gradle version 4.6 in gradle-wrapper.properties ?
+# - some kind of flavor declaration?
+# All while not breaking the existing Travis Android build.
+# good luck.
+
+# build-android:
+# name: Build Android (on Linux)
+# runs-on: ubuntu-latest
+# steps:
+# - uses: actions/checkout@v1
+# - name: set up JDK 1.8
+# uses: actions/setup-java@v1
+# with:
+# java-version: 1.8
+# - name: build
+# working-directory: android
+# run: bash ./gradlew buildDebug