Skip to content

8256393: Github Actions build on Linux should define OS and GCC versions #1225

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

Closed
wants to merge 3 commits into from
Closed
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
29 changes: 16 additions & 13 deletions .github/workflows/submit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
prerequisites:
name: Prerequisites
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
outputs:
should_run: ${{ steps.check_submit.outputs.should_run }}
bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }}
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true'

- name: Build jtreg
run: sh make/build-all.sh ${JAVA_HOME}
run: sh make/build-all.sh ${JAVA_HOME_8_X64}
Copy link
Member

Choose a reason for hiding this comment

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

What is this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

On ubuntu-20.04 the default Java installation is now set to 11, but jtreg still requires Java 8 for building.

Copy link
Member

Choose a reason for hiding this comment

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

I see! Okay then.

working-directory: jtreg
if: steps.check_submit.outputs.should_run != 'false' && steps.jtreg.outputs.cache-hit != 'true'

Expand All @@ -106,7 +106,7 @@ jobs:

linux_x64_build:
name: Linux x64
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
needs: prerequisites
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x64 != 'false'

Expand Down Expand Up @@ -185,7 +185,9 @@ jobs:
path: gtest

- name: Install dependencies
run: sudo apt-get install libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
run: |
sudo apt-get install gcc-10=10.2.0-5ubuntu1~20.04 g++-10=10.2.0-5ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should use apt-get functionality to install a specific version of packages? I'm not sure how relevant it is for the X and alsa libraries since they change very seldom, but perhaps for gcc, to get a specific point release of the compiler.

Copy link
Member

@magicus magicus Nov 16, 2020

Choose a reason for hiding this comment

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

Something along the lines of sudo apt-get install gcc-10=10.2.0-5ubuntu1~20, which I believe should match quite well the version used internally in the Oracle CI builds.

Copy link
Member Author

Choose a reason for hiding this comment

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

That sounds reasonable, I don't know how often these change in Ubuntu LTS, but can't hurt to be explicit here as well.


- name: Configure
run: >
Expand Down Expand Up @@ -217,7 +219,7 @@ jobs:

linux_x64_test:
name: Linux x64
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
needs:
- prerequisites
- linux_x64_build
Expand Down Expand Up @@ -396,7 +398,7 @@ jobs:

linux_aarch64_build:
name: Linux aarch64
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
needs:
- prerequisites
- linux_x64_build
Expand Down Expand Up @@ -532,7 +534,7 @@ jobs:

linux_arm_build:
name: Linux arm
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
needs:
- prerequisites
- linux_x64_build
Expand Down Expand Up @@ -668,7 +670,7 @@ jobs:

linux_s390x_build:
name: Linux s390x
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
needs:
- prerequisites
- linux_x64_build
Expand Down Expand Up @@ -804,7 +806,7 @@ jobs:

linux_ppc64le_build:
name: Linux ppc64le
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
needs:
- prerequisites
- linux_x64_build
Expand Down Expand Up @@ -940,7 +942,7 @@ jobs:

linux_x86_build:
name: Linux x86
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
needs: prerequisites
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x86 != 'false'

Expand Down Expand Up @@ -1014,7 +1016,8 @@ jobs:
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib libfreetype6-dev:i386 libxrandr-dev:i386 libxtst-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libcups2-dev:i386 libasound2-dev:i386
sudo apt-get install gcc-10-multilib g++-10-multilib libfreetype6-dev:i386 libxrandr-dev:i386 libxtst-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libcups2-dev:i386 libasound2-dev:i386
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10

- name: Configure
run: >
Expand Down Expand Up @@ -1047,7 +1050,7 @@ jobs:

linux_x86_test:
name: Linux x86
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
needs:
- prerequisites
- linux_x86_build
Expand Down Expand Up @@ -1838,7 +1841,7 @@ jobs:

artifacts:
name: Post-process artifacts
runs-on: "ubuntu-latest"
runs-on: "ubuntu-20.04"
if: always()
continue-on-error: true
needs:
Expand Down