Skip to content

Move CI to Github Action #2

Move CI to Github Action

Move CI to Github Action #2

Workflow file for this run

name: CI tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'heads/master') }}
jobs:
build_jdk:
runs-on: ubuntu-latest
container:
image: wmdietl/cf-ubuntu-jdk17-plus:latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Show environment
run: |
whoami
git config --get remote.origin.url
pwd
ls -al
env | sort
- name: Download jtreg
run: |
wget https://builds.shipilev.net/jtreg/jtreg-6.2%2B1.zip -O /tmp/$USER/jtreg.zip
unzip /tmp/$USER/jtreg.zip -d /tmp/$USER/
chmod +x /tmp/$USER/jtreg/bin/jtdiff /tmp/$USER/jtreg/bin/jtreg
- name: Configure
run: |
pwd && ls && bash ./configure --with-jtreg=/tmp/$USER/jtreg --disable-warnings-as-errors
- name: Make JDK
run: make jdk
timeout-minutes: 90
build_jdk17u:
runs-on: ubuntu-latest
container:
image: wmdietl/cf-ubuntu-jdk17-plus:latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Show environment
run: |
whoami
git config --get remote.origin.url
pwd
ls -al
env | sort
- name: Download jtreg
run: |
wget https://builds.shipilev.net/jtreg/jtreg-6.2%2B1.zip -O /tmp/$USER/jtreg.zip
unzip /tmp/$USER/jtreg.zip -d /tmp/$USER/
chmod +x /tmp/$USER/jtreg/bin/jtdiff /tmp/$USER/jtreg/bin/jtreg
- name: Clone plume-scripts
run: |
set -ex
if [ -d /tmp/$USER/plume-scripts ]; then
git -C /tmp/$USER/plume-scripts pull -q > /dev/null 2>&1
else
mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth 1 -q https://github.com/eisop-plume-lib/plume-scripts.git
fi
- name: Clone git-scripts
run: |
set -ex
if [ -d /tmp/$USER/git-scripts ]; then
git -C /tmp/$USER/git-scripts pull -q > /dev/null 2>&1
else
mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth 1 -q https://github.com/eisop-plume-lib/git-scripts.git
fi
- name: Clone related jdk17u
run: |
set -ex
/tmp/$USER/git-scripts/git-clone-related typetools jdk17u ../jdk17u -q --depth 1
- name: Git merge
run: |
set -ex
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global pull.ff true
git config --global pull.rebase false
eval `/tmp/$USER/plume-scripts/ci-info eisop`
cd ../jdk17u && git pull --no-edit https://github.com/${{ secrets.CI_ORGANIZATION }}/jdk ${{ secrets.CI_BRANCH }} || (git --version && git show && echo "Merge failed; see 'Pull request merge conflicts' at https://github.com/eisop/jdk/blob/master/README" && false)
- name: Configure
run: cd ../jdk17u && export JT_HOME=/tmp/$USER/jtreg && bash ./configure --with-jtreg=/tmp/$USER/jtreg --disable-warnings-as-errors
- name: Make JDK
run: cd ../jdk17u && make jdk
sanity:
name: ${{ matrix.script }} on JDK ${{ matrix.java_version }}
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
script: ['cftests-junit', 'cftests-nonjunit']
java_version: [17]
env:
JAVA_VERSION: ${{ matrix.java_version }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java_version }}
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/[email protected]
- name: Setup Bazel
uses: bazel-contrib/[email protected]
if: matrix.script == 'cftests-nonjunit'
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Run test script checker/bin-devel/test-${{ matrix.script }}.sh
run: ./checker/bin-devel/test-${{ matrix.script }}.sh
remainder:
name: ${{ matrix.script }} on JDK ${{ matrix.java_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
script: ['cftests-inference', 'typecheck-part1', 'typecheck-part2', 'plume-lib', 'daikon-part1', 'daikon-part2']
java_version: [21]
env:
JAVA_VERSION: ${{ matrix.java_version }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java_version }}
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/[email protected]
- name: Run test script checker/bin-devel/test-${{ matrix.script }}.sh
run: ./checker/bin-devel/test-${{ matrix.script }}.sh
if: (matrix.java_version != 8 || (matrix.script != 'plume-lib')) &&
(matrix.java_version <= 21 || (matrix.script != 'daikon-part1' && matrix.script != 'daikon-part2'))
otherjdks:
name: ${{ matrix.script }} on JDK ${{ matrix.java.version }}
runs-on: ubuntu-latest
needs: sanity
permissions:
contents: read
strategy:
fail-fast: true
matrix:
script: ['cftests-junit', 'cftests-nonjunit', 'cftests-inference', 'typecheck-part1', 'typecheck-part2']
java: [{version: '8', experimental: false}, {version: '11', experimental: false}, {version: '21', experimental: false}, {version: '22', experimental: true}, {version: '23-ea', experimental: true}, {version: '24-ea', experimental: true}]
env:
JAVA_VERSION: ${{ matrix.java.version }}
continue-on-error: ${{ matrix.java.experimental }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java.version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java.version }}
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/[email protected]
- name: Setup Bazel
uses: bazel-contrib/[email protected]
if: matrix.script == 'cftests-nonjunit'
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Run test script checker/bin-devel/test-${{ matrix.script }}.sh
run: ./checker/bin-devel/test-${{ matrix.script }}.sh