Skip to content

Commit 8440e56

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

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/build-linux.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,26 @@ jobs:
9494
- name: 'Cache sysroot'
9595
uses: actions/cache@v3
9696
with:
97-
path: sysroot-focal
97+
path: ${{ github.workspace }}/sysroot-focal
9898
key: sysroot-focal-${{ runner.as }}
9999

100100
- name: 'Setup cross-compilation sysroot'
101101
run: |
102102
set -vx
103+
SYSROOT_PATH="${{ github.workspace }}/sysroot-focal
104+
echo "SYSROOT_PATH=$SYSROOT_PATH" >> $GITHUB_ENV
103105
if [ ! -d sysroot-focal ]; then
104-
sudo debootstrap --arch=$(dpkg --print-architecture) --foreign focal sysroot-focal http://archive.ubuntu.com/ubuntu
106+
sudo debootstrap --arch=$(dpkg --print-architecture) focal sysroot-focal http://archive.ubuntu.com/ubuntu
105107
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
108+
sudo chroot sysroot-focal apt-get update
109+
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
108110
# 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
111+
sudo chroot sysroot-focal apt-get install -y software-properties-common
112+
sudo chroot sysroot-focal sudo add-apt-repository ppa:ubuntu-toolchain-r/test
111113
# So the OpenJDK configuration and build can use the sysroot
112114
sudo chown -R $USER:$USER sysroot-focal
115+
echo $PWD
116+
ls -F
113117
114118
- name: 'Checkout the JDK source'
115119
uses: actions/checkout@v3.6.0
@@ -152,6 +156,8 @@ jobs:
152156
153157
- name: 'Configure'
154158
run: >
159+
set -vx &&
160+
ls -F &&
155161
bash configure
156162
--with-conf-name=${{ inputs.platform }}
157163
${{ matrix.flags }}
@@ -169,6 +175,7 @@ jobs:
169175
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
170176
echo "Dumping config.log:" &&
171177
cat config.log &&
178+
echo PWD=$PWD &&
172179
exit 1)
173180
174181
- name: 'Build'

0 commit comments

Comments
 (0)