-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
83 additions
and
2 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,79 @@ | ||
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/[email protected] | ||
- 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 | ||
|
||
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 |
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
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