Skip to content
Closed
25 changes: 25 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -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
36 changes: 36 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
@@ -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
25 changes: 4 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions test/junit/JUnitTests.gmk
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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) \
Expand Down