ci-it.yaml 4.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you 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: CI AND IT

19 20
on:
  pull_request:
21
  schedule:
22
    - cron: '0 18 * * *'  # TimeZone: UTC 0
23 24 25 26

env:
  MAVEN_OPTS: -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit
  CODECOV_TOKEN: d2065307-8f01-4637-9715-2781ef096db7
27 28 29

jobs:
  CI:
30
    runs-on: ubuntu-latest
31
    timeout-minutes: 90
32
    steps:
33
      - uses: actions/checkout@v2
34 35
        with:
          submodules: true
36 37
      - name: Set Skip Env Var
        uses: ./.github/actions/skip
38
      - name: Check License Header
39
        if: env.SKIP_CI != 'true'
40 41 42
        uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43
      - name: Cache local Maven repository
44
        if: env.SKIP_CI != 'true'
45 46 47 48 49 50
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
51
      - uses: actions/setup-java@v1
52
        if: env.SKIP_CI != 'true'
53 54
        with:
          java-version: 8
E
Evan 已提交
55
      - name: 'Check Javaagent Plugin List'
56
        if: env.SKIP_CI != 'true'
E
Evan 已提交
57
        run: tools/plugin/check-javaagent-plugin-list.sh
58
      - name: 'Install & Test'
59
        if: env.SKIP_CI != 'true'
60
        run: |
61
          ./mvnw --batch-mode -P"agent,backend,ui,dist,CI-with-IT" clean cobertura:cobertura verify install javadoc:javadoc
62
          bash <(curl -s https://codecov.io/bash)
63
      - name: 'Check Dependencies Licenses'
64
        if: env.SKIP_CI != 'true'
65
        run: tools/dependencies/check-LICENSE.sh
66

67
  CI-on-JDK11:
68
    runs-on: ubuntu-latest
69 70 71 72 73
    timeout-minutes: 90
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
74 75
      - name: Set Skip Env Var
        uses: ./.github/actions/skip
76
      - name: Check License Header
77
        if: env.SKIP_CI != 'true'
78
        uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587
79
      - name: Cache local Maven repository
80
        if: env.SKIP_CI != 'true'
81 82 83 84 85 86
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
87
      - uses: actions/setup-java@v1
88
        if: env.SKIP_CI != 'true'
89 90 91
        with:
          java-version: 11
      - name: 'Install & Test'
92
        if: env.SKIP_CI != 'true'
93 94
        run: ./mvnw --batch-mode -P"agent,backend,ui,dist" clean verify install

95
  CI-on-Windows:
96
    runs-on: windows-latest
97
    timeout-minutes: 90
98
    steps:
99
      - uses: actions/checkout@v2
100 101
        with:
          submodules: true
102 103
      - name: Set Skip Env Var
        uses: ./.github/actions/skip
104
      - uses: actions/setup-java@v1
105
        if: env.SKIP_CI != 'true'
106 107 108
        with:
          java-version: 8
      - name: 'Install & Test'
109
        if: env.SKIP_CI != 'true'
110
        run: ./mvnw --batch-mode -P"agent,backend,ui,dist" clean verify install
111 112 113 114


  CI-on-MacOS:
    runs-on: macos-latest
115
    timeout-minutes: 90
116
    steps:
117
      - uses: actions/checkout@v2
118 119
        with:
          submodules: true
120 121
      - name: Set Skip Env Var
        uses: ./.github/actions/skip
122
      - name: Cache local Maven repository
123
        if: env.SKIP_CI != 'true'
124 125 126 127 128 129
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
130
      - uses: actions/setup-java@v1
131
        if: env.SKIP_CI != 'true'
132 133 134
        with:
          java-version: 8
      - name: 'Install & Test'
135
        if: env.SKIP_CI != 'true'
136 137 138 139
        run: |
          # Given packaging on Mac has a high possibility to fail, we retry one more time here
          ./mvnw --batch-mode -P"agent,backend,ui,dist" clean verify install || \
          ./mvnw --batch-mode -P"agent,backend,ui,dist" clean verify install