Skip to content

Commit 66ab042

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

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

.github/workflows/build-linux.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,28 +91,32 @@ 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/[email protected]
96+
9497
- name: 'Cache sysroot'
9598
uses: actions/cache@v3
9699
with:
97-
path: sysroot-focal
100+
path: ${{ github.workspace }}/sysroot-focal
98101
key: sysroot-focal-${{ runner.as }}
99102

100103
- name: 'Setup cross-compilation sysroot'
101104
run: |
102105
set -vx
106+
SYSROOT_PATH="${{ github.workspace }}/sysroot-focal"
107+
echo "SYSROOT_PATH=$SYSROOT_PATH" >> $GITHUB_ENV
103108
if [ ! -d sysroot-focal ]; then
104-
sudo debootstrap --arch=$(dpkg --print-architecture) --foreign focal sysroot-focal http://archive.ubuntu.com/ubuntu
109+
sudo debootstrap --arch=$(dpkg --print-architecture) focal sysroot-focal http://archive.ubuntu.com/ubuntu
105110
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
111+
sudo chroot sysroot-focal apt-get update
112+
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
108113
# 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
114+
sudo chroot sysroot-focal apt-get install -y software-properties-common
115+
sudo chroot sysroot-focal sudo add-apt-repository ppa:ubuntu-toolchain-r/test
111116
# So the OpenJDK configuration and build can use the sysroot
112117
sudo chown -R $USER:$USER sysroot-focal
113-
114-
- name: 'Checkout the JDK source'
115-
uses: actions/[email protected]
118+
echo $PWD
119+
ls -F
116120
117121
- name: 'Get the BootJDK'
118122
id: bootjdk
@@ -152,6 +156,9 @@ jobs:
152156
153157
- name: 'Configure'
154158
run: >
159+
set -vx &&
160+
pwd &&
161+
ls -F &&
155162
bash configure
156163
--with-conf-name=${{ inputs.platform }}
157164
${{ matrix.flags }}
@@ -162,13 +169,14 @@ jobs:
162169
--with-gtest=${{ steps.gtest.outputs.path }}
163170
--with-zlib=system
164171
--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"
172+
--with-sysroot=${{ env.SYSROOT_PATH }}
173+
--with-extra-cflags=--sysroot=${{ env.SYSROOT_PATH }}
174+
--with-extra-cxxflags=--sysroot=${{ env.SYSROOT_PATH }}
175+
--with-extra-ldflags=--sysroot=${{ env.SYSROOT_PATH }}
169176
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
170177
echo "Dumping config.log:" &&
171-
cat config.log &&
178+
echo cat config.log &&
179+
echo PWD=$PWD &&
172180
exit 1)
173181
174182
- name: 'Build'

0 commit comments

Comments
 (0)