Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
dougxc committed Jul 29, 2024
1 parent eac0722 commit f7a832f
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 33 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,10 @@ jobs:
runs-on: ubuntu-22.04

# Remove bundles so they are not misconstrued as binary distributions from the JDK project
remove-bundles:
name: 'Remove bundle artifacts'
runs-on: ubuntu-22.04
if: always()
# remove-bundles:
# name: 'Remove bundle artifacts'
# runs-on: ubuntu-22.04
# if: always()
# needs:
# - build-linux-x64
# - build-linux-x86
Expand All @@ -372,13 +372,13 @@ jobs:
# - test-macos-x64
# - test-windows-x64

steps:
# Hack to get hold of the api environment variables that are only defined for actions
- name: 'Get API configuration'
id: api
uses: actions/github-script@v7
with:
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
# steps:
# # Hack to get hold of the api environment variables that are only defined for actions
# - name: 'Get API configuration'
# id: api
# uses: actions/github-script@v7
# with:
# script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'

# - name: 'Remove bundle artifacts'
# run: |
Expand Down
84 changes: 62 additions & 22 deletions .github/workflows/test-libgraal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,48 +59,88 @@ jobs:
MX_PYTHON: python3.8

steps:
- name: Get pull request URL using GitHub API
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'pull_request' }}
run: |
PR_URL=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} | jq -r .html_url)
echo "PR_URL=$PR_URL"
echo "PR_URL=$PR_URL" >> ${GITHUB_ENV}
- name: 'Checkout the JDK source'
uses: actions/checkout@v4

- name: 'Clone Graal'
id: graal
uses: ./.github/actions/get-graal
# - name: 'Clone Graal'
# id: graal
# continue-on-error: true
# uses: ./.github/actions/get-graal

- name: 'Get bundles'
id: bundles
continue-on-error: true
uses: ./.github/actions/get-bundles
with:
platform: ${{ inputs.platform }}
debug-suffix: ${{ matrix.debug-suffix }}
include-static-libs: true

- name: Determine mx and python version
continue-on-error: true
run: |
echo "MX_VERSION=$(jq -r '.mx_version' ${{ steps.graal.outputs.path }}/common.json)" >> ${GITHUB_ENV}
echo "PYTHON_VERSION=$(grep MX_PYTHON ${{ steps.graal.outputs.path }}/ci/common.jsonnet | sed 's:.*"python\(.*\)",:\1:g')" >> ${GITHUB_ENV}
- name: Checkout graalvm/mx
uses: actions/checkout@v4
with:
repository: graalvm/mx.git
ref: ${{ env.MX_VERSION }}
fetch-depth: 1
path: ${{ env.MX_PATH }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Update mx cache
uses: actions/cache@v3
with:
path: ~/.mx
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
restore-keys: ${{ runner.os }}-mx-
# - name: Checkout graalvm/mx
# uses: actions/checkout@v4
# with:
# repository: graalvm/mx.git
# ref: ${{ env.MX_VERSION }}
# fetch-depth: 1
# path: ${{ env.MX_PATH }}
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: Update mx cache
# uses: actions/cache@v4
# with:
# path: ~/.mx
# key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
# restore-keys: ${{ runner.os }}-mx-

- name: Build libgraal
id: build-libgraal
run: ${MX_PATH}/mx --primary-suite-path ${{ steps.graal.outputs.path }}/vm --java-home=${{ steps.bundles.outputs.jdk-path }} --env libgraal build
continue-on-error: true
run: |
${MX_PATH}/mx \
--primary-suite-path ${{ steps.graal.outputs.path }}/vm \
--java-home=${{ steps.bundles.outputs.jdk-path }} \
--env libgraal build
- name: Test libgraal
id: libgraal-gate
run: ${MX_PATH}/mx --primary-suite-path ${{ steps.graal.outputs.path }}/vm --java-home=${{ steps.bundles.outputs.jdk-path }} --env libgraal gate --task 'LibGraal Compiler'
continue-on-error: true
run: |
env
${MX_PATH}/mx \
--primary-suite-path ${{ steps.graal.outputs.path }}/vm \
--java-home=${{ steps.bundles.outputs.jdk-path }} \
--env libgraal gate --task 'LibGraal Compiler'
- name: Libgraal notify failure
id: libgraal-notify
if: job.steps.libgraal-gate.status == failure()
uses: actions/github-script@v7
with:
script: |
const issueNumber = 8;
const { GITHUB_SERVER_URL, GITHUB_REPOSITORY, GITHUB_RUN_ID, PR_URL } = process.env;
await github.rest.issues.createComment({
owner: 'dougxc',
repo: 'jdk',
issue_number: issueNumber,
body: `**OpenJDK libgraal CI failure**: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/job/${GITHUB_JOB}
Pull Request: ${PR_URL}`
});

0 comments on commit f7a832f

Please sign in to comment.