Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
all default: ci.yml

%: %.m4 defs.m4
@chmod -f +w $@ || true
m4 $< > $@
# Squeeze multiple blank lines into one.
cat -s $@ > $@.tmp
# Remove leading blank lines.
sed '/[^[:blank:]]/,$$!d' $@.tmp > $@
# Remove trailing blank lines.
sed -e :a -e '/^\s*$$/{$$d;N;ba' -e '}' $@ > $@.tmp
mv -f $@.tmp $@
@chmod -w $@

clean:
rm -f ci.yml
Comment on lines +1 to +16
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add .PHONY declarations and .DELETE_ON_ERROR to harden the Makefile.

Two issues in the same recipe surface area:

  1. Missing .PHONY for all, default, clean (also flagged by checkmake). If a file named all, default, or clean ever exists in this directory, make will treat the target as up-to-date and silently skip the recipe.

  2. Partial-output corruption on m4 failure. m4 $< > $@ creates $@ via shell redirection before m4 runs. If m4 fails, make aborts but leaves a stale/empty ci.yml whose mtime is newer than ci.yml.m4/defs.m4, so the next make invocation will consider it up-to-date and not rebuild. .DELETE_ON_ERROR: removes the target on recipe failure and avoids this trap.

🛠️ Proposed fix
 all default: ci.yml
+
+.PHONY: all default clean
+.DELETE_ON_ERROR:

 %: %.m4 defs.m4
 	`@chmod` -f +w $@ || true
 	m4 $< > $@
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
all default: ci.yml
%: %.m4 defs.m4
@chmod -f +w $@ || true
m4 $< > $@
# Squeeze multiple blank lines into one.
cat -s $@ > $@.tmp
# Remove leading blank lines.
sed '/[^[:blank:]]/,$$!d' $@.tmp > $@
# Remove trailing blank lines.
sed -e :a -e '/^\s*$$/{$$d;N;ba' -e '}' $@ > $@.tmp
mv -f $@.tmp $@
@chmod -w $@
clean:
rm -f ci.yml
all default: ci.yml
.PHONY: all default clean
.DELETE_ON_ERROR:
%: %.m4 defs.m4
`@chmod` -f +w $@ || true
m4 $< > $@
# Squeeze multiple blank lines into one.
cat -s $@ > $@.tmp
# Remove leading blank lines.
sed '/[^[:blank:]]/,$$!d' $@.tmp > $@
# Remove trailing blank lines.
sed -e :a -e '/^\s*$$/{$$d;N;ba' -e '}' $@ > $@.tmp
mv -f $@.tmp $@
`@chmod` -w $@
clean:
rm -f ci.yml
🧰 Tools
🪛 checkmake (0.3.2)

[warning] 15-15: Required target "all" is missing from the Makefile.

(minphony)


[warning] 15-15: Required target "clean" must be declared PHONY.

(minphony)


[warning] 15-15: Required target "test" is missing from the Makefile.

(minphony)


[warning] 1-1: Target "all default" should be declared PHONY.

(phonydeclared)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/Makefile around lines 1 - 16, Add Makefile phony and
delete-on-error declarations: declare .PHONY for the targets all, default, and
clean (so files named those won't short-circuit recipes) and add a
.DELETE_ON_ERROR: directive to ensure partial outputs (e.g., created by the m4
-> $@ redirection in the pattern rule that generates ci.yml) are removed if the
recipe fails; place these declarations near the top of the Makefile before the
rules for all/default/% and clean.

371 changes: 371 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,371 @@
# DO NOT EDIT ci.yml. Edit ci.yml.m4 and defs.m4 instead.

name: CI

on:
push:
pull_request:
workflow_dispatch:

defaults:
run:
shell: bash --noprofile --norc {0}

jobs:
build_jdk:
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk21-plus:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: show environment
run: |
whoami
git config --get remote.origin.url
pwd
ls -al
env | sort
- name: configure
run: pwd && ls && bash ./configure --with-jtreg=/usr/share/jtreg --disable-warnings-as-errors
- name: make jdk
timeout-minutes: 90
run: make jdk

build_jdk21u:
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk21-plus:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: show environment
run: |
whoami
git config --get remote.origin.url
pwd
ls -al
env | sort
- name: git-scripts
run: |
set -ex
if test -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/plume-lib/git-scripts.git ; \
fi
- name: plume-scripts
run: |
set -ex
if test -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/plume-lib/plume-scripts.git ; \
fi
# This creates ../jdk21u .
# Run `git-clone-related` without a limit on depth, because if the depth is
# too small, the merge will fail. Don't use "--filter=blob:none" because that
# leads to "fatal: remote error: filter 'combine' not supported".
- name: clone-related-jdk21u
run: |
set -ex
echo "pwd = $(pwd)"
if test -d ../jdk21u; then
echo "../jdk21u should not exist yet"
false
fi
df .
/tmp/$USER/git-scripts/git-clone-related typetools jdk21u ../jdk21u --single-branch
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global core.longpaths true
git config --global core.protectNTFS false
cd ../jdk21u
git diff --exit-code
echo $?
- name: git merge plan
run: |
cd ../jdk21u && git status
eval $(/tmp/$USER/plume-scripts/ci-info typetools)
set
echo "About to run: git pull --no-edit https://github.com/${CI_ORGANIZATION}/jdk ${CI_BRANCH_NAME}"
- name: git merge
run: |
set -ex
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global pull.ff true
git config --global pull.rebase false
git config --global core.longpaths true
git config --global core.protectNTFS false
cd ../jdk21u && git status
eval $(/tmp/$USER/plume-scripts/ci-info typetools)
set
echo "About to run: git pull --no-edit https://github.com/${CI_ORGANIZATION}/jdk ${CI_BRANCH_NAME}"
cd ../jdk21u && git pull --no-edit https://github.com/${CI_ORGANIZATION}/jdk ${CI_BRANCH_NAME} || (git --version && git show | head -100 && git status && git diff | head -1000 && echo "Merge failed; see 'Pull request merge conflicts' at https://github.com/typetools/jdk/blob/master/README.md " && false)
- name: configure
run: cd ../jdk21u && export JT_HOME=/usr/share/jtreg && bash ./configure --with-jtreg --disable-warnings-as-errors
- name: make jdk
run: cd ../jdk21u && make jdk

canary_jobs:
needs:
- build_jdk
- build_jdk21u
runs-on: ubuntu-latest
steps:
- name: canary_jobs
run: true

cftests_junit_jdk17:
needs:
- canary_jobs
timeout-minutes: 120
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk17:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-cftests-junit.sh
run: (cd ../checker-framework && checker/bin-devel/test-cftests-junit.sh)
cftests_nonjunit_jdk17:
needs:
- canary_jobs
timeout-minutes: 120
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk17:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-cftests-nonjunit.sh
run: (cd ../checker-framework && checker/bin-devel/test-cftests-nonjunit.sh)
cftests_typecheck_jdk17:
needs:
- canary_jobs
timeout-minutes: 120
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk17:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-typecheck.sh
run: (cd ../checker-framework && checker/bin-devel/test-typecheck.sh)
cftests_junit_jdk21:
needs:
- canary_jobs
timeout-minutes: 120
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk21:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-cftests-junit.sh
run: (cd ../checker-framework && checker/bin-devel/test-cftests-junit.sh)
cftests_nonjunit_jdk21:
needs:
- canary_jobs
timeout-minutes: 120
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk21:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-cftests-nonjunit.sh
run: (cd ../checker-framework && checker/bin-devel/test-cftests-nonjunit.sh)
cftests_inference_jdk21:
needs:
- canary_jobs
timeout-minutes: 120
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk21:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-cftests-inference.sh
run: (cd ../checker-framework && checker/bin-devel/test-cftests-inference.sh)
cftests_typecheck_jdk21:
needs:
- canary_jobs
timeout-minutes: 120
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk21:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-typecheck.sh
run: (cd ../checker-framework && checker/bin-devel/test-typecheck.sh)
cftests_junit_jdk25:
needs:
- canary_jobs
timeout-minutes: 120
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk25:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-cftests-junit.sh
run: (cd ../checker-framework && checker/bin-devel/test-cftests-junit.sh)
cftests_nonjunit_jdk25:
needs:
- canary_jobs
timeout-minutes: 120
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk25:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-cftests-nonjunit.sh
run: (cd ../checker-framework && checker/bin-devel/test-cftests-nonjunit.sh)
cftests_inference_jdk25:
needs:
- canary_jobs
timeout-minutes: 120
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk25:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-cftests-inference.sh
run: (cd ../checker-framework && checker/bin-devel/test-cftests-inference.sh)
cftests_typecheck_jdk25:
needs:
- canary_jobs
timeout-minutes: 120
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk25:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-typecheck.sh
run: (cd ../checker-framework && checker/bin-devel/test-typecheck.sh)

test_daikon_part1:
needs:
- canary_jobs
timeout-minutes: 70
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk17:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-daikon-part1.sh
run: (cd ../checker-framework && checker/bin-devel/test-daikon-part1.sh)
test_daikon_part2:
needs:
- canary_jobs
timeout-minutes: 70
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk17:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-daikon-part2.sh
run: (cd ../checker-framework && checker/bin-devel/test-daikon-part2.sh)
test_daikon_part3:
needs:
- canary_jobs
timeout-minutes: 70
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk17:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-daikon-part3.sh
run: (cd ../checker-framework && checker/bin-devel/test-daikon-part3.sh)

test_plume_lib:
needs:
- canary_jobs
runs-on: ubuntu-latest
container: mdernst/cf-ubuntu-jdk17:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 25
- name: clone git-scripts
run: mkdir -p /tmp/$USER && git -C /tmp/$USER clone --depth=1 -q https://github.com/plume-lib/git-scripts.git
- name: clone checker-framework
run: /tmp/$USER/git-scripts/git-clone-related typetools checker-framework
- name: test-plume-lib.sh
run: (cd ../checker-framework && checker/bin-devel/test-plume-lib.sh)
Loading
Loading