Skip to content

Commit

Permalink
Merge pull request #1 from apache/master
Browse files Browse the repository at this point in the history
Merge from apache/thrift:master
  • Loading branch information
wujjpp authored May 25, 2022
2 parents 43faa2d + 4646a35 commit 1fd3bfc
Show file tree
Hide file tree
Showing 730 changed files with 28,103 additions and 17,061 deletions.
Empty file modified .editorconfig
100755 → 100644
Empty file.
235 changes: 235 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
name: "Build"

on:
push:
branches: ["*"]
pull_request:
branches: ["*"]

env:
BUILD_DEPS: automake bison flex git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config

jobs:
# TODO windows and macos
compiler:
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
sudo apt-get update -yq
sudo apt-get install -y --no-install-recommends g++ $BUILD_DEPS
- name: Run bootstrap
run: ./bootstrap.sh

- name: Run configure
run: ./configure --disable-debug --disable-tests --disable-libs

- name: Run make
run: make -j$(nproc)

- name: Run install
run: make install

- name: Run thrift version
run: /usr/local/bin/thrift -version

# only upload while building ubuntu-20.04
- name: Archive built thrift compiler
if: matrix.os == 'ubuntu-20.04'
uses: actions/upload-artifact@v3
with:
name: thrift-compiler
path: compiler/cpp/thrift
retention-days: 3

lib-java-kotlin:
needs: compiler
runs-on: ubuntu-20.04
env:
GRADLE_VERSION: 7.4.2
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: "gradle"

- name: Install dependencies
run: |
sudo apt-get update -yq
sudo apt-get install -y --no-install-recommends $BUILD_DEPS
sudo apt-get install -y wget unzip ant maven
- name: Setup gradle
run: |
wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip
(echo "29e49b10984e585d8118b7d0bc452f944e386458df27371b49b4ac1dec4b7fda /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -)
unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip
sudo mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle
sudo ln -s /usr/local/gradle/bin/gradle /usr/local/bin
gradle --version
- name: Run spotlessCheck for Java
run: |
cd lib/java
gradle spotlessCheck
- name: Run ktfmtCheck for Kotlin
run: |
cd lib/kotlin
gradle ktfmtCheck
- name: Run bootstrap
run: ./bootstrap.sh

- name: Run configure
run: |
./configure \
--disable-debug \
--disable-tests \
--disable-dependency-tracking \
--without-cpp \
--without-c_glib \
--with-java \
--with-kotlin \
--without-python \
--without-py3 \
--without-ruby \
--without-haxe \
--without-netstd \
--without-perl \
--without-php \
--without-php_extension \
--without-dart \
--without-erlang \
--without-go \
--without-d \
--without-nodejs \
--without-nodets \
--without-lua \
--without-rs \
--without-swift
- uses: actions/download-artifact@v3
with:
name: thrift-compiler
path: compiler/cpp

- name: Run thrift-compiler
run: |
chmod a+x compiler/cpp/thrift
compiler/cpp/thrift -version
- name: Run make for java
run: make -C lib/java

# this will invoke publishToMavenLocal and install locally
- name: Run make install for java
run: make -C lib/java install

- name: Upload java libthrift artifacts
uses: actions/upload-artifact@v3
with:
name: libthrift
if-no-files-found: error
path: ~/.m2/repository/org/apache/thrift

- name: Run make check for java
run: make -C lib/java check

- name: Run make precross for java
run: make -C lib/java precross

- name: Upload java precross artifacts
uses: actions/upload-artifact@v3
with:
name: java-precross
if-no-files-found: error
path: |
lib/java/build/functionalTestJar/
lib/java/build/runclient
lib/java/build/runnonblockingserver
lib/java/build/runserver
lib/java/build/runservletserver
retention-days: 3

- name: Run make for kotlin
run: make -C lib/kotlin

- name: Run make check for kotlin
run: make -C lib/kotlin check

- name: Run make precross for kotlin
run: make -C lib/kotlin precross

- name: Upload kotlin precross artifacts
uses: actions/upload-artifact@v3
with:
name: kotlin-precross
if-no-files-found: error
path: |
lib/kotlin/cross-test-client/build/install/TestClient/
lib/kotlin/cross-test-server/build/install/TestServer/
retention-days: 3

cross-test:
needs:
- lib-java-kotlin
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.x"
- uses: actions/setup-java@v3
with:
distribution: temurin
# here we intentionally use java 8 so that we also verify java 11 compiles to version 8
java-version: 8
cache: "gradle"

- name: Download java precross artifacts
uses: actions/download-artifact@v3
with:
name: java-precross
path: lib/java/build

- name: Download kotlin precross artifacts
uses: actions/download-artifact@v3
with:
name: kotlin-precross
path: lib/kotlin

- name: Set back executable flags
run: |
chmod a+x \
lib/java/build/run* \
lib/kotlin/cross-test-client/build/install/TestClient/bin/* \
lib/kotlin/cross-test-server/build/install/TestServer/bin/*
- name: Run cross test
env:
THRIFT_CROSSTEST_CONCURRENCY: 4
PRECROSS_LANGS: java,kotlin
run: |
python test/test.py \
--retry-count 5 \
--skip-known-failures \
--server $PRECROSS_LANGS \
--client $PRECROSS_LANGS
- name: Upload log files from failed cross test runs
uses: actions/upload-artifact@v3
if: failure()
with:
name: cross-test-log
path: test/log/
retention-days: 3
37 changes: 37 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 'Build with CMake'

on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]

env:
BUILD_DEPS: bison flex g++ libboost-all-dev libevent-dev libssl-dev make cmake

jobs:
compiler:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
sudo apt-get update -yq
sudo apt-get install -y --no-install-recommends $BUILD_DEPS
- name: Generate makefile using CMake
run: |
mkdir cmake_build
cd cmake_build
cmake .. -DBUILD_LIBRARIES=OFF
- name: Run make
run: |
cd cmake_build
cmake --build .
- name: Run test
run: |
cd cmake_build
ctest -j$(nproc)
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ project.lock.json
/lib/dart/**/packages
/lib/dart/**/.pub/
/lib/dart/**/pubspec.lock
/lib/delphi/*.local
/lib/delphi/*.identcache
/lib/delphi/test/skip/bin
/lib/delphi/test/serializer/*.dat
/lib/delphi/**/*.identcache
Expand Down Expand Up @@ -227,6 +229,13 @@ project.lock.json
/lib/js/dist
/lib/js/doc
/lib/js/test/build
/lib/kotlin/cross-test-client/build/
/lib/kotlin/cross-test-server/build/
/lib/kotlin/build/
/lib/kotlin/.gradle/
/lib/kotlin/gradle/
/lib/kotlin/gradlew
/lib/kotlin/gradlew.bat
/lib/netstd/**/bin
/lib/netstd/**/obj
/lib/nodejs/coverage
Expand Down Expand Up @@ -272,6 +281,7 @@ project.lock.json
/lib/erl/logs/
/lib/go/pkg
/lib/go/src
/lib/go/test/fuzz/gopathfuzz
/lib/go/test/gopath/
/lib/go/test/ThriftTest.thrift
/lib/nodets/test-compiled/
Expand Down
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@
#
# Docker Integration
# see: build/docker/README.md
#
#

sudo: required
dist: trusty
# https://docs.travis-ci.com/user/reference/linux
dist: xenial
language: cpp

services:
- docker

install:
- if [[ `uname` == "Linux" ]]; then build/docker/refresh.sh; fi
# https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
# adding `travis_wait` because kerl building in the docker file takes >10 min for building erlang
# without printing to stdout, resulting in build failures
- if [[ `uname` == "Linux" ]]; then travis_wait 40 build/docker/refresh.sh; fi

stages:
- docker # docker images
Expand Down
8 changes: 4 additions & 4 deletions ApacheThrift.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
the "Thrift" project.
2. nuget setApiKey <your-api-key>
3. nuget pack ApacheThrift.nuspec -Symbols -SymbolPackageFormat snupkg
4. nuget push ApacheThrift.0.15.0.nupkg -Source https://api.nuget.org/v3/index.json
4. nuget push ApacheThrift.0.17.0.nupkg -Source https://api.nuget.org/v3/index.json
-->

<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>ApacheThrift</id>
<version>0.15.0</version>
<title>Apache Thrift 0.15.0</title>
<version>0.17.0</version>
<title>Apache Thrift 0.17.0</title>
<authors>Apache Thrift Developers</authors>
<owners>Apache Software Foundation</owners>
<license type="expression">Apache-2.0</license>
Expand All @@ -36,7 +36,7 @@
<description>
Contains runtime libraries from lib/netstd for netstandard2.0 framework development.
</description>
<repository type="GitHub" url="https://github.com/apache/thrift" branch="release/0.15.0" />
<repository type="GitHub" url="https://github.com/apache/thrift" branch="release/0.17.0" />
<tags>Apache Thrift RPC</tags>
</metadata>
<files>
Expand Down
Loading

0 comments on commit 1fd3bfc

Please sign in to comment.