Skip to content

Commit

Permalink
chore: update CI configs
Browse files Browse the repository at this point in the history
- update github actions
  - actions/setup-java
  - actions/checkout
- remove CI jdk 20
- upgrade `bash-buddy`
- remove stale `appveyor` files
  • Loading branch information
oldratlee committed Dec 2, 2023
1 parent 7dc29bc commit e4367c9
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 70 deletions.
15 changes: 9 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
time: "21:00"
open-pull-requests-limit: 10
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 20
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ on: [ push, pull_request, workflow_dispatch ]
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
timeout-minutes: 10
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
java: [ 8, 11, 17, 20, 21 ]
java: [ 8, 11, 17, 21 ]
fail-fast: false
max-parallel: 64
name: Fast Test on Java ${{ matrix.java }} OS ${{ matrix.os }}
name: Fast CI on Java ${{ matrix.java }} OS ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
Expand Down
20 changes: 7 additions & 13 deletions .github/workflows/strong_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,33 @@ jobs:
test:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners
runs-on: ubuntu-latest
timeout-minutes: 15
name: Strong Test by multiply java versions
timeout-minutes: 20
name: Strong CI by multiply java versions

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

- name: setup Java 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 8
distribution: zulu
# only first java setup need enable cache
cache: maven
- name: setup Java 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 11
distribution: microsoft
- name: setup Java 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: microsoft
- name: setup Java 20
uses: actions/setup-java@v3
with:
java-version: 20
distribution: zulu
- name: setup Java 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: zulu
Expand All @@ -49,7 +44,6 @@ jobs:
JAVA8_HOME: ${{ env.JAVA_HOME_8_X64 }}
JAVA11_HOME: ${{ env.JAVA_HOME_11_X64 }}
JAVA17_HOME: ${{ env.JAVA_HOME_17_X64 }}
JAVA20_HOME: ${{ env.JAVA_HOME_20_X64 }}
JAVA21_HOME: ${{ env.JAVA_HOME_21_X64 }}

- name: remove self maven install files
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<system>GitHub Issues</system>
</issueManagement>
<ciManagement>
<system>AppVeyor</system>
<url>https://ci.appveyor.com/project/oldratlee/transmittable-thread-local</url>
<system>GitHub Actions</system>
<url>https://github.com/alibaba/transmittable-thread-local/actions</url>
</ciManagement>
<organization>
<name>Alibaba</name>
Expand Down
33 changes: 0 additions & 33 deletions scripts/clear-appveyor-cache.ps1

This file was deleted.

20 changes: 10 additions & 10 deletions scripts/integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ BASH_BUDDY_ROOT="$(readlink -f bash-buddy)"
readonly BASH_BUDDY_ROOT
source "$BASH_BUDDY_ROOT/lib/trap_error_info.sh"
source "$BASH_BUDDY_ROOT/lib/common_utils.sh"
source "$BASH_BUDDY_ROOT/lib/java_build_utils.sh"
source "$BASH_BUDDY_ROOT/lib/java_utils.sh"
source "$BASH_BUDDY_ROOT/lib/maven_utils.sh"

################################################################################
# ci build logic
Expand All @@ -18,7 +19,6 @@ readonly JDK_VERSIONS=(
8
"$default_build_jdk_version"
17
20
21
)
readonly default_jh_var_name="JAVA${default_build_jdk_version}_HOME"
Expand All @@ -29,8 +29,8 @@ readonly default_jh_var_name="JAVA${default_build_jdk_version}_HOME"
# https://stackoverflow.com/questions/25201430
#
# shellcheck disable=SC2034
JVB_MVN_OPTS=(
"${JVB_DEFAULT_MVN_OPTS[@]}"
MVU_MVN_OPTS=(
"${MVU_DEFAULT_MVN_OPTS[@]}"
-DperformRelease -P'!gen-sign'
-Dmaven.plugin.validation=NONE
${CI_MORE_MVN_OPTS:+${CI_MORE_MVN_OPTS}}
Expand All @@ -48,7 +48,7 @@ cd "$PROJECT_ROOT_DIR"
export JAVA_HOME="${!default_jh_var_name}"

cu::head_line_echo "build and test with Java $default_build_jdk_version: $JAVA_HOME"
jvb::mvn_cmd clean install
mvu::mvn_cmd clean install

########################################
# test by multi-version jdk
Expand All @@ -65,25 +65,25 @@ for jdk_version in "${JDK_VERSIONS[@]}"; do
# about CI env var
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
if [ "${CI:-}" = true ]; then
jvb::mvn_cmd jacoco:prepare-agent surefire:test -Denforcer.skip jacoco:report
mvu::mvn_cmd jacoco:prepare-agent surefire:test -Denforcer.skip jacoco:report
else
jvb::mvn_cmd surefire:test -Denforcer.skip
mvu::mvn_cmd surefire:test -Denforcer.skip
fi
fi

cu::head_line_echo "test with TTL Agent and Java $jdk_version: $JAVA_HOME"

cu::blue_echo 'Run unit test under ttl agent, include check for ExecutorService, ForkJoinPool, Timer/TimerTask'
jvb::mvn_cmd -Penable-ttl-agent-for-test surefire:test -Denforcer.skip \
mvu::mvn_cmd -Penable-ttl-agent-for-test surefire:test -Denforcer.skip \
-Dttl.agent.extra.d.options='-Drun-ttl-test-under-agent-with-enable-timer-task=true'

cu::blue_echo 'Run unit test under ttl agent, and turn on the disable inheritable for thread pool enhancement'
jvb::mvn_cmd -Penable-ttl-agent-for-test surefire:test -Denforcer.skip \
mvu::mvn_cmd -Penable-ttl-agent-for-test surefire:test -Denforcer.skip \
-Dttl.agent.extra.args='ttl.agent.disable.inheritable.for.thread.pool:true' \
-Dttl.agent.extra.d.options='-Drun-ttl-test-under-agent-with-disable-inheritable=true'

cu::blue_echo 'Run agent check for Timer/TimerTask, explicit "ttl.agent.enable.timer.task"'
jvb::mvn_cmd -Penable-ttl-agent-for-test surefire:test -Denforcer.skip \
mvu::mvn_cmd -Penable-ttl-agent-for-test surefire:test -Denforcer.skip \
-Dttl.agent.extra.args='ttl.agent.enable.timer.task:true' \
-Dttl.agent.extra.d.options='-Drun-ttl-test-under-agent-with-enable-timer-task=true'
done

0 comments on commit e4367c9

Please sign in to comment.