Skip to content

Commit 4f0e52a

Browse files
hosuabyvelo
andauthored
CI: migrate build pipeline on GitHub actions (#2759)
* CI: migrate build pipeline on GitHub actions * Deploy tags too Signed-off-by: Marvin Froeder <velo.br@gmail.com> * Never fail dependencies download Signed-off-by: Marvin Froeder <velo.br@gmail.com> --------- Signed-off-by: Marvin Froeder <velo.br@gmail.com> Co-authored-by: Marvin Froeder <velo.br@gmail.com> Co-authored-by: Marvin <velo@users.noreply.github.com>
1 parent 62e7b1a commit 4f0e52a

File tree

8 files changed

+152
-256
lines changed

8 files changed

+152
-256
lines changed

.circleci/config.yml

Lines changed: 0 additions & 140 deletions
This file was deleted.
File renamed without changes.

.github/files/toolchains.xml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!--
2+
3+
Copyright 2012-2019 The Feign Authors
4+
5+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
6+
in compliance with the License. You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software distributed under the License
11+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12+
or implied. See the License for the specific language governing permissions and limitations under
13+
the License.
14+
15+
-->
16+
<toolchains>
17+
<toolchain>
18+
<type>jdk</type>
19+
<provides>
20+
<version>1.8</version>
21+
</provides>
22+
<configuration>
23+
<jdkHome>/home/runner/.sdkman/candidates/java/8.0.382-tem</jdkHome>
24+
</configuration>
25+
</toolchain>
26+
<toolchain>
27+
<type>jdk</type>
28+
<provides>
29+
<version>11</version>
30+
</provides>
31+
<configuration>
32+
<jdkHome>/home/runner/.sdkman/candidates/java/11.0.22-tem</jdkHome>
33+
</configuration>
34+
</toolchain>
35+
<toolchain>
36+
<type>jdk</type>
37+
<provides>
38+
<version>17</version>
39+
</provides>
40+
<configuration>
41+
<jdkHome>/home/runner/.sdkman/candidates/java/17.0.10-tem</jdkHome>
42+
</configuration>
43+
</toolchain>
44+
<toolchain>
45+
<type>jdk</type>
46+
<provides>
47+
<version>21</version>
48+
</provides>
49+
<configuration>
50+
<jdkHome>/home/runner/.sdkman/candidates/java/21.0.2-tem</jdkHome>
51+
</configuration>
52+
</toolchain>
53+
</toolchains>

.github/workflows/build.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#
2+
# Copyright 2012-2020 The Feign Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5+
# in compliance with the License. You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License
10+
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11+
# or implied. See the License for the specific language governing permissions and limitations under
12+
# the License.
13+
#
14+
name: Build
15+
16+
on:
17+
push:
18+
branches:
19+
- master
20+
tags:
21+
- '*' # Runs on all new tags
22+
pull_request:
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 30
28+
env:
29+
# Customize the JVM maximum heap limit
30+
MAVEN_OPTS: -Xmx3200m
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
with:
35+
ref: ${{ github.event.pull_request.head.ref }}
36+
repository: ${{ github.event.pull_request.head.repo.full_name }}
37+
38+
- name: Cache local Maven repository
39+
uses: actions/cache@v3
40+
continue-on-error: true
41+
with:
42+
path: ~/.m2
43+
key: ${{ runner.os }}-maven-${{ matrix.language }} ${{ hashFiles('**/pom.xml') }}
44+
restore-keys: |
45+
${{ runner.os }}-maven-${{ matrix.language }}
46+
${{ runner.os }}-maven-
47+
48+
- name: Cache SDKMAN JDKs
49+
uses: actions/cache@v4
50+
with:
51+
path: ~/.sdkman
52+
key: sdkman-java-${{ runner.os }}-${{ hashFiles('~/.m2/toolchains.xml') }}
53+
restore-keys: sdkman-java-${{ runner.os }}-
54+
55+
- name: Install SDKMAN!
56+
run: |
57+
if [ ! -d "$HOME/.sdkman" ]; then
58+
curl -s "https://get.sdkman.io" | bash
59+
fi
60+
source "$HOME/.sdkman/bin/sdkman-init.sh"
61+
62+
- name: Install JDKs (8, 11, 17, 21)
63+
run: |
64+
source "$HOME/.sdkman/bin/sdkman-init.sh"
65+
jdk_versions=("8.0.382-tem" "11.0.22-tem" "17.0.10-tem" "21.0.2-tem")
66+
for jdk_version in "${jdk_versions[@]}"; do
67+
if [ ! -d "$HOME/.sdkman/candidates/java/$jdk_version" ]; then
68+
yes n | sdk install java "$jdk_version"
69+
fi
70+
done
71+
sdk default java 21.0.2-tem
72+
73+
- name: Configure Maven Toolchain
74+
run: |
75+
mkdir -p ~/.m2
76+
cp .github/files/toolchains.xml ~/.m2/toolchains.xml
77+
78+
- name: Download dependencies only
79+
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
80+
81+
- name: Build
82+
run: ./mvnw -ntp -B clean install
83+
84+
- name: Verify formatting
85+
run: scripts/no-git-changes.sh
86+
87+
- name: Nexus deploy
88+
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
89+
run: |
90+
cp .github/files/settings.xml ~/.m2/settings.xml
91+
echo -e "$GPG_KEY" | gpg --batch --no-tty --import --yes
92+
./mvnw -ntp -nsu -P release -pl -:feign-benchmark -DskipTests=true deploy

.github/workflows/comment-pr.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)