forked from openjdk/jdk
-
Notifications
You must be signed in to change notification settings - Fork 39
Setup GitHub action ci #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
YukiYang31
wants to merge
2
commits into
typetools:master
Choose a base branch
from
YukiYang31:setup_github_action_ci
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+598
−0
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
.PHONYdeclarations and.DELETE_ON_ERRORto harden the Makefile.Two issues in the same recipe surface area:
Missing
.PHONYforall,default,clean(also flagged bycheckmake). If a file namedall,default, orcleanever exists in this directory, make will treat the target as up-to-date and silently skip the recipe.Partial-output corruption on m4 failure.
m4 $< > $@creates$@via shell redirection before m4 runs. If m4 fails, make aborts but leaves a stale/emptyci.ymlwhose mtime is newer thanci.yml.m4/defs.m4, so the nextmakeinvocation will consider it up-to-date and not rebuild..DELETE_ON_ERROR:removes the target on recipe failure and avoids this trap.🛠️ Proposed fix
📝 Committable suggestion
🧰 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