diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml new file mode 100644 index 0000000..b424849 --- /dev/null +++ b/.github/workflows/test-linux.yml @@ -0,0 +1,25 @@ +name: 'Test (linux)' + +on: + workflow_call: + +jobs: + test: + name: 'ApiDiff' + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: 'Check out repository' + uses: actions/checkout@v4 + - name: 'Set up Java Development Kit' + uses: oracle-actions/setup-java@v1 + with: + website: oracle.com + release: 17 + - name: 'Build ApiDiff' + shell: bash + run: bash make/build.sh + - name: 'Test ApiDiff' + shell: bash + run: bash make/build.sh --skip-download -- test diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml new file mode 100644 index 0000000..28a63c1 --- /dev/null +++ b/.github/workflows/test-windows.yml @@ -0,0 +1,36 @@ +name: 'Test (windows)' + +on: + workflow_call: + +env: + MSYS2_PATH_TYPE: minimal + CHERE_INVOKING: 1 + +jobs: + test: + name: 'ApiDiff' + runs-on: windows-latest + strategy: + fail-fast: false + steps: + - name: 'Keep text file line-ending intact' + run: git config --global core.autocrlf input + - name: 'Check out repository' + uses: actions/checkout@v4 + - name: 'Install MSYS2' + uses: msys2/setup-msys2@v2.22.0 + with: + install: 'autoconf tar unzip zip make' + path-type: minimal + - name: 'Set up Java Development Kit' + uses: oracle-actions/setup-java@v1 + with: + website: oracle.com + release: 17 + - name: 'Build ApiDiff' + shell: msys2 {0} + run: bash make/build.sh + - name: 'Test ApiDiff' + shell: msys2 {0} + run: bash make/build.sh --skip-download -- test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36cac1f..91654d9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,24 +7,7 @@ on: - pr/* jobs: - - linux-x64: - runs-on: ubuntu-latest - - steps: - - name: 'Check out repository' - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: 'Set up Java Development Kit' - uses: oracle-actions/setup-java@v1 - with: - website: oracle.com - release: 17 - - - name: 'Build ApiDiff' - shell: bash - run: | - java --version - bash make/build.sh + test-linux: + uses: ./.github/workflows/test-linux.yml + test-windows: + uses: ./.github/workflows/test-windows.yml diff --git a/test/junit/JUnitTests.gmk b/test/junit/JUnitTests.gmk index 87ae669..0a94129 100644 --- a/test/junit/JUnitTests.gmk +++ b/test/junit/JUnitTests.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -41,7 +41,6 @@ $(BUILDTESTDIR)/JUnitTests.ok: \ $(RM) $(@:%.ok=%/work) $(@:%.ok=%/report) $(MKDIR) -p $(@:%.ok=%/work) $(@:%.ok=%/report) cd $(@:%.ok=%/work) ; \ - set -o pipefail ; \ $(JAVA) \ $(JUnitTest.add-exports) \ -jar $(JUNIT_JAR) \