gemmellr commented on code in PR #166: URL: https://github.com/apache/qpid-broker-j/pull/166#discussion_r1066133025
########## .github/workflows/build.yml: ########## @@ -0,0 +1,68 @@ +# +# 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: "Build" + +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + java: [ 11, 17 ] + + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Install JDK ${{ matrix.java }} + uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + + - name: Licence Check + run: mvn -Papache-release,dependency-check clean apache-rat:check verify -DskipTests -Dgpg.skip -Denforcer.skip=true -Dmaven.javadoc.skip=true + + - name: Archive rat.txt On Failure + if: failure() + run: tar -czvf licence-check-${{ matrix.java }}.tar.gz **/target/rat.txt + + - name: Install + run: mvn clean install -DskipTests=true Review Comment: If installing stuff to the local repo during the run, its good to clean out the built items from the local repo before it is cached, otherwise the output will be cached and later builds might pick up stale things that either mask or cause issues later. Cleaning them also reduces the amount the cache grows over time with stale content. E.g see https://github.com/apache/activemq-artemis/blob/2.27.1/.github/workflows/build.yml#L103-L107 doing this for similar reasons. It looks to only nuke snapshots of certain bits since the build uses other activemq/artemis release versions/artifacts for compatibility tests, so it would still sit and download those all every build if nuking the full activemq subtree. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org