| # |
| # 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 |
| # |
| # 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', 'STREAMS-*'] |
| pull_request: |
| branches: ['master', 'STREAMS-*'] |
| schedule: |
| # Run daily at 3pm UTC |
| - cron: '0 15 * * *' |
| |
| jobs: |
| build: |
| strategy: |
| matrix: |
| os: ['Ubuntu', 'macOS'] |
| java_version: ['1.8', '11'] |
| timeout-minutes: 60 |
| runs-on: ${{ matrix.os }}-latest |
| name: ${{ matrix.os }} - Java ${{ matrix.java_version }} |
| steps: |
| - name: Checkout apache/streams.git |
| uses: actions/checkout@v2 |
| - name: Set up Java ${{ matrix.java_version }} |
| uses: actions/setup-java@v1.3.0 |
| with: |
| java-version: ${{ matrix.java_version }} |
| - name: Restore ~/.m2/repository |
| uses: actions/cache@v2 |
| with: |
| path: | |
| ~/.m2/repository/ |
| !~/.m2/repository/org/apache/streams |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('.github/workflows/*.yml') }} |
| - name: mvn -B -V clean install -ff -ntp -DskipTests=${{ matrix.java_version == '11' }} |
| env: |
| MAVEN_OPTS: -Xmx1g -XX:ReservedCodeCacheSize=1g -XX:+UseG1GC -Dorg.slf4j.simpleLogger.defaultLogLevel=INFO |
| run: mvn -B -V clean install -ff -ntp -DskipTests=${{ matrix.java_version == '11' }} |