Skip to content

Commit 7672bec

Browse files
committed
fixup! GHA: Try using a sysroot instead of a container
1 parent 0df744d commit 7672bec

File tree

5 files changed

+28
-18
lines changed

5 files changed

+28
-18
lines changed

.github/actions/do-build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ runs:
6666
shell: bash
6767

6868
- name: 'Upload build logs'
69-
uses: actions/upload-artifact@v3
69+
uses: actions/upload-artifact@v4
7070
with:
7171
name: failure-logs-${{ inputs.platform }}${{ inputs.debug-suffix }}
7272
path: failure-logs

.github/actions/get-bundles/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ runs:
4848
steps:
4949
- name: 'Download bundles artifact'
5050
id: download-bundles
51-
uses: actions/download-artifact@v3
51+
uses: actions/download-artifact@v4
5252
with:
5353
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
5454
path: bundles
5555
continue-on-error: true
5656

5757
- name: 'Download bundles artifact (retry)'
58-
uses: actions/download-artifact@v3
58+
uses: actions/download-artifact@v4
5959
with:
6060
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
6161
path: bundles

.github/actions/upload-bundles/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ runs:
6969
shell: bash
7070

7171
- name: 'Upload bundles artifact'
72-
uses: actions/upload-artifact@v3
72+
uses: actions/upload-artifact@v4
7373
with:
7474
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
7575
path: bundles

.github/workflows/build-linux.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,28 +91,34 @@ jobs:
9191
sudo apt-get install -y software-properties-common schroot fakeroot fakechroot
9292
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
9393
94+
- name: 'Checkout the JDK source'
95+
uses: actions/checkout@v4
96+
9497
- name: 'Cache sysroot'
98+
id: cache-sysroot
9599
uses: actions/cache@v3
96100
with:
97-
path: sysroot-focal
101+
path: ${{ github.workspace }}/sysroot-focal
98102
key: sysroot-focal-${{ runner.as }}
99103

100104
- name: 'Setup cross-compilation sysroot'
105+
if: steps.cache-sysroot.oututs.cache-hit != 'true'
101106
run: |
102107
set -vx
108+
SYSROOT_PATH="${{ github.workspace }}/sysroot-focal"
109+
echo "SYSROOT_PATH=$SYSROOT_PATH" >> $GITHUB_ENV
103110
if [ ! -d sysroot-focal ]; then
104-
sudo debootstrap --arch=$(dpkg --print-architecture) --foreign focal sysroot-focal http://archive.ubuntu.com/ubuntu
111+
sudo debootstrap --arch=$(dpkg --print-architecture) focal sysroot-focal http://archive.ubuntu.com/ubuntu
105112
fi
106-
sudo chroot sysroot-focal ${PWD}/sysroot-focal/$(which apt-get) update
107-
sudo chroot sysroot-focal ${PWD}/sysroot-focal/$(which apt-get) install -y build-essential git wget curl sudo unzip zip autoconf libfreetype6-dev libcups2-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev libasound2-dev libffi-dev file binutils libfontconfig-dev
113+
sudo chroot sysroot-focal apt-get update
114+
sudo chroot sysroot-focal apt-get install -y build-essential git wget curl sudo unzip zip autoconf libfreetype6-dev libcups2-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev libasound2-dev libffi-dev file binutils libfontconfig-dev
108115
# If we really need gcc-10, we can get it from this PPA:
109-
sudo chroot sysroot-focal ${PWD}/sysroot-focal/$(which apt-get) install -y software-properties-common
110-
sudo chroot sysroot-focal ${PWD}/sysroot-focal/$(which sudo) add-apt-repository ppa:ubuntu-toolchain-r/test
116+
sudo chroot sysroot-focal apt-get install -y software-properties-common
117+
sudo chroot sysroot-focal sudo add-apt-repository ppa:ubuntu-toolchain-r/test
111118
# So the OpenJDK configuration and build can use the sysroot
112119
sudo chown -R $USER:$USER sysroot-focal
113-
114-
- name: 'Checkout the JDK source'
115-
uses: actions/checkout@v3.6.0
120+
echo $PWD
121+
ls -F
116122
117123
- name: 'Get the BootJDK'
118124
id: bootjdk
@@ -152,6 +158,9 @@ jobs:
152158
153159
- name: 'Configure'
154160
run: >
161+
set -vx &&
162+
pwd &&
163+
ls -F &&
155164
bash configure
156165
--with-conf-name=${{ inputs.platform }}
157166
${{ matrix.flags }}
@@ -162,13 +171,14 @@ jobs:
162171
--with-gtest=${{ steps.gtest.outputs.path }}
163172
--with-zlib=system
164173
--with-jmod-compress=zip-1
165-
--with-sysroot=$PWD/sysroot-focal
166-
--with-extra-cflags="--sysroot=$PWD/sysroot-focal"
167-
--with-extra-cxxflags="--sysroot=$PWD/sysroot-focal"
168-
--with-extra-ldflags="--sysroot=$PWD/sysroot-focal"
174+
--with-sysroot=${{ env.SYSROOT_PATH }}
175+
--with-extra-cflags=--sysroot=${{ env.SYSROOT_PATH }}
176+
--with-extra-cxxflags=--sysroot=${{ env.SYSROOT_PATH }}
177+
--with-extra-ldflags=--sysroot=${{ env.SYSROOT_PATH }}
169178
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
170179
echo "Dumping config.log:" &&
171180
cat config.log &&
181+
echo PWD=$PWD &&
172182
exit 1)
173183
174184
- name: 'Build'

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ jobs:
195195
if: always()
196196

197197
- name: 'Upload test results'
198-
uses: actions/upload-artifact@v3
198+
uses: actions/upload-artifact@v4
199199
with:
200200
path: results
201201
name: ${{ steps.package.outputs.artifact-name }}

0 commit comments

Comments
 (0)