|
66 | 66 | build-linux: |
67 | 67 | name: build |
68 | 68 | runs-on: ubuntu-latest |
69 | | - container: |
| 69 | + #container: |
70 | 70 | #image: debian:bullseye |
71 | | - image: ubuntu:18.04 |
| 71 | + #image: ubuntu:18.04 |
72 | 72 |
|
73 | 73 | strategy: |
74 | 74 | fail-fast: false |
|
88 | 88 | apt-get install -y software-properties-common |
89 | 89 | sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
90 | 90 |
|
| 91 | + - name: 'Cache sysroot' |
| 92 | + uses: actions/cache@v3 |
| 93 | + with: |
| 94 | + path: sysroot-bullseye |
| 95 | + key: sysroot-bullseye-${{ runner.as }} |
| 96 | + |
| 97 | + - name: 'Setup cross-compilation sysroot' |
| 98 | + run: | |
| 99 | + if [ ! -d sysroot-bullseye ]; then |
| 100 | + sudo debootstrap --arch=$(dpkg --print-architecture) bullseye sysroot-bullseye http://archive.ubuntu.com/ubuntu |
| 101 | + fi |
| 102 | + sudo chroot sysroot-bullseye apt-get update |
| 103 | + sudo chroot sysroot-bullseye apt-get install -y build-essential git wget curl sudo unzip zip openjdk-11-jdk 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 |
| 104 | + # If we really need gcc-10, we can get it from this PPA: |
| 105 | + sudo chroot sysroot-bullseye apt-get install -y software-properties-common |
| 106 | + sudo chroot sysroot-bullseye sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
| 107 | +
|
91 | 108 | - name: 'Checkout the JDK source' |
92 | 109 | uses: actions/checkout@v3.6.0 |
93 | 110 |
|
@@ -139,6 +156,10 @@ jobs: |
139 | 156 | --with-gtest=${{ steps.gtest.outputs.path }} |
140 | 157 | --with-zlib=system |
141 | 158 | --with-jmod-compress=zip-1 |
| 159 | + --with-sysroot=$PWD/sysroot-bullseye |
| 160 | + --with-extra-cflags="--sysroot=$PWD/sysroot-bullseye" |
| 161 | + --with-extra-cxxflags="--sysroot=$PWD/sysroot-bullseye" |
| 162 | + --with-extra-ldflags="--sysroot=$PWD/sysroot-bullseye" |
142 | 163 | ${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || ( |
143 | 164 | echo "Dumping config.log:" && |
144 | 165 | cat config.log && |
|
0 commit comments