Skip to content

CI: migrate build pipeline on GitHub actions #2759

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

Merged
merged 4 commits into from
Feb 10, 2025
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
140 changes: 0 additions & 140 deletions .circleci/config.yml

This file was deleted.

File renamed without changes.
53 changes: 53 additions & 0 deletions .github/files/toolchains.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--

Copyright 2012-2019 The Feign Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the specific language governing permissions and limitations under
the License.

-->
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>1.8</version>
</provides>
<configuration>
<jdkHome>/home/runner/.sdkman/candidates/java/8.0.382-tem</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>11</version>
</provides>
<configuration>
<jdkHome>/home/runner/.sdkman/candidates/java/11.0.22-tem</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>17</version>
</provides>
<configuration>
<jdkHome>/home/runner/.sdkman/candidates/java/17.0.10-tem</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>21</version>
</provides>
<configuration>
<jdkHome>/home/runner/.sdkman/candidates/java/21.0.2-tem</jdkHome>
</configuration>
</toolchain>
</toolchains>
92 changes: 92 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#
# Copyright 2012-2020 The Feign Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
name: Build

on:
push:
branches:
- master
tags:
- '*' # Runs on all new tags
pull_request:

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
# Customize the JVM maximum heap limit
MAVEN_OPTS: -Xmx3200m
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Cache local Maven repository
uses: actions/cache@v3
continue-on-error: true
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ matrix.language }} ${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-${{ matrix.language }}
${{ runner.os }}-maven-

- name: Cache SDKMAN JDKs
uses: actions/cache@v4
with:
path: ~/.sdkman
key: sdkman-java-${{ runner.os }}-${{ hashFiles('~/.m2/toolchains.xml') }}
restore-keys: sdkman-java-${{ runner.os }}-

- name: Install SDKMAN!
run: |
if [ ! -d "$HOME/.sdkman" ]; then
curl -s "https://get.sdkman.io" | bash
fi
source "$HOME/.sdkman/bin/sdkman-init.sh"

- name: Install JDKs (8, 11, 17, 21)
run: |
source "$HOME/.sdkman/bin/sdkman-init.sh"
jdk_versions=("8.0.382-tem" "11.0.22-tem" "17.0.10-tem" "21.0.2-tem")
for jdk_version in "${jdk_versions[@]}"; do
if [ ! -d "$HOME/.sdkman/candidates/java/$jdk_version" ]; then
yes n | sdk install java "$jdk_version"
fi
done
sdk default java 21.0.2-tem

- name: Configure Maven Toolchain
run: |
mkdir -p ~/.m2
cp .github/files/toolchains.xml ~/.m2/toolchains.xml

- name: Download dependencies only
run: ./mvnw -ntp -B org.apache.maven.plugins:maven-dependency-plugin:3.8.1:go-offline de.qaware.maven:go-offline-maven-plugin:1.2.8:resolve-dependencies -fn

- name: Build
run: ./mvnw -ntp -B clean install

- name: Verify formatting
run: scripts/no-git-changes.sh

- name: Nexus deploy
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
run: |
cp .github/files/settings.xml ~/.m2/settings.xml
echo -e "$GPG_KEY" | gpg --batch --no-tty --import --yes
./mvnw -ntp -nsu -P release -pl -:feign-benchmark -DskipTests=true deploy
56 changes: 0 additions & 56 deletions .github/workflows/comment-pr.yml

This file was deleted.

Loading
Loading