blob: 0dbb4ed7019390ed46532640e0c6a8477d915343 [file] [log] [blame]
# 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
on:
pull_request:
schedule:
- cron: '0 18 * * *' # TimeZone: UTC 0
concurrency:
group: ci-it-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
jobs:
check-license-header:
if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule')
name: Check License Header
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Check License Header
uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ci-platform:
if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule')
name: Build and Test / Java ${{ matrix.java-version }} / ${{ matrix.os }}
needs: [ check-license-header ]
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 60
strategy:
matrix:
os: [ ubuntu, macos, windows ]
java-version: [ 8 ]
include:
- os: ubuntu
java-version: 11
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set Skip Env Var
uses: ./.github/actions/skip
- name: Cache local Maven repository
if: env.SKIP_CI != 'true'
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-ci-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- uses: actions/setup-java@v2
if: env.SKIP_CI != 'true'
with:
java-version: ${{ matrix.java-version }}
distribution: adopt
- name: Build and Test
if: env.SKIP_CI != 'true' && matrix.os == 'ubuntu'
run: |
./mvnw -q --batch-mode -P"backend,ui,dist,CI-with-IT" clean verify install javadoc:javadoc
- name: Build and Test
if: env.SKIP_CI != 'true' && matrix.os != 'ubuntu'
run: ./mvnw -q --batch-mode -P"backend,ui,dist" clean verify install
- uses: actions/upload-artifact@v2
name: Upload Agent
with:
name: dist
path: dist
check-dependency-license:
if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule')
needs: [ ci-platform ]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set Skip Env Var
uses: ./.github/actions/skip
- uses: actions/download-artifact@v2
if: env.SKIP_CI != 'true'
with:
name: dist
path: dist
- name: Cache local Maven repository
if: env.SKIP_CI != 'true'
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-ci-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Check Dependencies Licenses
if: env.SKIP_CI != 'true'
run: tools/dependencies/check-LICENSE.sh
ci:
if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule')
name: CI
needs: [ check-dependency-license ]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set Skip Env Var
uses: ./.github/actions/skip
- name: Merge Requirement
if: env.SKIP_CI != 'true'
run: echo 'Merge Requirement'