@@ -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'
0 commit comments