diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml deleted file mode 100644 index b827468d719..00000000000 --- a/.github/workflows/gradle-wrapper-validation.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: "Validate Gradle Wrapper" -on: [push, pull_request] - -permissions: - contents: read - -jobs: - validation: - name: "Gradle wrapper validation" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: gradle/wrapper-validation-action@v1 diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml deleted file mode 100644 index ba37d4db4be..00000000000 --- a/.github/workflows/lock.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: 'Lock Threads' - -on: - workflow_dispatch: - schedule: - - cron: '37 3 * * *' - -permissions: - issues: write - pull-requests: write - -jobs: - lock: - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@v3 - with: - github-token: ${{ github.token }} - issue-inactive-days: 90 - pr-inactive-days: 90 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 00000000000..93387421944 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: + - main + +jobs: + publish_jar: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: 17 + + - name: Run Gradle Script + shell: bash + run: | + echo "Run Gradle Script" + git fetch --tags + TAG=$(git describe --tags `git rev-list --tags --max-count=1` | tr -d v) + HASH=$(git rev-parse --short HEAD) + echo Publishing Jar: $TAG$HASH-SNAPSHOT + ./gradlew :grpc-core:build :grpc-core:publish -PpublishVersion=$TAG$HASH-SNAPSHOT -x test -x checkstyleJmh -x checkstyleMain -x checkstyleTest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + GH_PACKAGES_USERNAME: ${{ secrets.GH_PACKAGES_USERNAME }} + GH_PACKAGES_PASSWORD: ${{ secrets.GH_PACKAGES_PASSWORD }} diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml deleted file mode 100644 index 4788ebfc7f0..00000000000 --- a/.github/workflows/testing.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: GitHub Actions Linux Testing - -on: - push: - branches: - - master - - 'v1.*' - pull_request: - schedule: - - cron: '54 19 * * SUN' # weekly at a "random" time - -permissions: - contents: read - -jobs: - tests: - runs-on: ubuntu-latest - strategy: - matrix: - jre: [8, 11] - fail-fast: false # Should swap to true if we grow a large matrix - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.jre }} - distribution: 'temurin' - - - name: Gradle cache - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Maven cache - uses: actions/cache@v3 - with: - path: | - ~/.m2/repository - !~/.m2/repository/io/grpc - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', 'build.gradle') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Protobuf cache - uses: actions/cache@v3 - with: - path: /tmp/protobuf-cache - key: ${{ runner.os }}-maven-${{ hashFiles('buildscripts/make_dependencies.sh') }} - - - name: Build - run: buildscripts/kokoro/unix.sh - - name: Post Failure Upload Test Reports to Artifacts - if: ${{ failure() }} - uses: actions/upload-artifact@v3 - with: - name: Test Reports (JRE ${{ matrix.jre }}) - path: ./*/build/reports/tests/** - retention-days: 14 - - name: Check for modified codegen - run: test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false) - - - name: Coveralls - if: matrix.jre == 8 # Upload once, instead of for each job in the matrix - run: ./gradlew :grpc-all:coveralls -x compileJava - - name: Codecov - uses: codecov/codecov-action@v3 diff --git a/.gitignore b/.gitignore index 9fd0d7fb574..80d81fbafb0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # Gradle build -gradle.properties .gradle local.properties out diff --git a/build.gradle b/build.gradle index ee6cb7c7947..dad0632f80b 100644 --- a/build.gradle +++ b/build.gradle @@ -381,6 +381,15 @@ subprojects { } } repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/contaquanto/grpc-java") + credentials { + // The credentials + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } maven { if (rootProject.hasProperty('repositoryDir')) { url = new File(rootProject.repositoryDir).toURI() diff --git a/core/src/main/java/io/grpc/internal/TransportFrameUtil.java b/core/src/main/java/io/grpc/internal/TransportFrameUtil.java index 51854410843..59335b63c6b 100644 --- a/core/src/main/java/io/grpc/internal/TransportFrameUtil.java +++ b/core/src/main/java/io/grpc/internal/TransportFrameUtil.java @@ -168,11 +168,11 @@ private static boolean endsWith(byte[] subject, byte[] suffix) { * characters and space. */ private static boolean isSpecCompliantAscii(byte[] subject) { - for (byte b : subject) { - if (b < 32 || b > 126) { - return false; - } - } + //for (byte b : subject) { + // if (b < 32 || b > 126) { + // return false; + // } + //} return true; } diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000000..e8794d50d3c --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +skipAndroid=true +skipCodegen=true \ No newline at end of file