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

Moved various language tests from AppVeyor to GitHub Actions #6300

Merged
merged 1 commit into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
111 changes: 111 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@ jobs:
name: Windows flatc binary
path: Release\flatc.exe

build-windows-2017:
name: Build Windows 2017
runs-on: windows-2016
steps:
- uses: actions/checkout@v1
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: cmake
run: cmake -G "Visual Studio 15 2017" -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

build-mac:
name: Build Mac
runs-on: macos-latest
Expand Down Expand Up @@ -82,3 +96,100 @@ jobs:
- name: build
working-directory: android
run: bash ./gradlew clean build

build-java:
name: Build Java
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: test
working-directory: tests
run: bash JavaTest.sh

build-rust:
name: Build Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: test
working-directory: tests
run: bash RustTest.sh

#build-js:
# name: Build JS
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - name: flatc
# # FIXME: make test script not rely on flatc
# run: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_INSTALL=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF . && make -j4
# - name: test
# working-directory: tests
# run: bash JavaScriptTest.sh

#build-ts:
# name: Build TS
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - name: flatc
# # FIXME: make test script not rely on flatc
# run: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_INSTALL=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF . && make -j4
# - name: test
# working-directory: tests
# run: bash TypeScriptTest.sh

build-python:
name: Build Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: test
working-directory: tests
run: bash PythonTest.sh

#build-go:
# name: Build Go
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - name: flatc
# # FIXME: make test script not rely on flatc
# run: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_INSTALL=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF . && make -j4
# - name: test
# working-directory: tests
# run: bash GoTest.sh

#build-csharp:
# name: Build CSharp
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - name: test
# working-directory: tests/FlatBuffers.Test
# run: bash NetTest.sh

build-php:
name: Build PHP
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: flatc
# FIXME: make test script not rely on flatc
run: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_INSTALL=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF . && make -j4
- name: test
working-directory: tests
run: |
php phpTest.php
sh phpUnionVectorTest.sh

build-swift:
name: Build Swift
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: test
working-directory: tests/FlatBuffers.Test.Swift
run: sh SwiftTest.sh


40 changes: 0 additions & 40 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ environment:
CMAKE_VS_VERSION: "14 2015"
MONSTER_EXTRA: ""

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_VS_VERSION: "15 2017"
CMAKE_OPTIONS: "-DFLATBUFFERS_ENABLE_PCH=1"
MONSTER_EXTRA: ""

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_VS_VERSION: "16 2019"
CMAKE_OPTIONS: "-DFLATBUFFERS_ENABLE_PCH=1"
MONSTER_EXTRA: ""

platform:
- x86
- x64
Expand All @@ -49,8 +39,6 @@ before_build:
- cmake . -G"Visual Studio %CMAKE_VS_VERSION%" -DFLATBUFFERS_CODE_SANITIZE=1 %CMAKE_OPTIONS%
# This cuts down on a lot of noise generated by xamarin warnings.
- if exist "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets" del "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
- if exist "C:\Program Files (x86)\MSBuild\15.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets" del "C:\Program Files (x86)\MSBuild\15.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
- if exist "C:\Program Files (x86)\MSBuild\16.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets" del "C:\Program Files (x86)\MSBuild\16.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"

build:
project: ALL_BUILD.vcxproj
Expand All @@ -62,11 +50,6 @@ after_build:

install:
- set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
- rustup-init.exe -y
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- rustc -V
- cargo -V

test_script:
- call .appveyor\check-generate-code.bat -b %CONFIGURATION%
Expand All @@ -78,33 +61,12 @@ test_script:
- "cd .."
- "%CONFIGURATION%\\flattests.exe"
- "cd tests"
- rem "---------------- Java -----------------"
- "java -version"
- "JavaTest.bat"
- rem "---------------- Rust ----------------"
- "RustTest.bat"
- rem "---------------- JS -----------------"
- "node --version"
- "..\\%CONFIGURATION%\\flatc -b -I include_test monster_test.fbs unicode_test.json"
- "npm install"
- "npm run pretest"
- "node JavaScriptTest ./monster_test_generated"
- rem "-------------- Python ---------------"
- where python
- python --version
- where pip
- pip --version
- where conda
- conda --version
- rem "installing flatbuffers python library"
- pip install ../python
- rem "testing without installing Numpy"
- python py_test.py 0 0 0
- rem "testing after installing Numpy - disabled"
# FIXME: This has a LOT of unnecessary dependencies and makes the tests fail
# with timeouts.
# - conda install --yes numpy
# - python py_test.py 0 0 0
- rem "---------------- C# -----------------"
# Have to compile this here rather than in "build" above because AppVeyor only
# supports building one project??
Expand All @@ -118,8 +80,6 @@ test_script:
# Run tests with UNSAFE_BYTEBUFFER
- "msbuild.exe /property:Configuration=Release;UnsafeByteBuffer=true;OutputPath=.tmp /verbosity:minimal FlatBuffers.Test.csproj"
- ".tmp\\FlatBuffers.Test.exe"
# TODO: add more languages.
- "cd ..\\.."

artifacts:
- path: $(CONFIGURATION)\flatc.exe
Expand Down