diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23f91b942d..152f4b8020 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,9 +43,7 @@ jobs: linux: name: Linux needs: cache-kotlinc - runs-on: ubuntu-latest - container: - image: centos:7 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -56,37 +54,19 @@ jobs: run: shell: bash steps: - - name: Upgrade git - run: | - sed -i \ - -e 's/^mirrorlist/#mirrorlist/' \ - -e 's/^#baseurl/baseurl/' \ - -e 's/mirror\.centos\.org/vault.centos.org/' \ - /etc/yum.repos.d/*.repo - yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm - yum -y install git - name: Checkout repository - run: git clone --depth 3 https://github.com/${{ github.repository }}.git . - - name: Configure yum - run: | - yum -y install epel-release - yum -y update - - name: Install build dependencies - run: | - yum -y install centos-release-scl - sed -i \ - -e 's/^mirrorlist/#mirrorlist/' \ - -e 's/^#baseurl/baseurl/' \ - -e 's/^# baseurl/baseurl/' \ - -e 's/mirror\.centos\.org/vault.centos.org/' \ - /etc/yum.repos.d/CentOS-SCLo-scl*.repo - yum -y install devtoolset-11-gcc-c++ - yum -y install ant awscli zstd - - name: Install LWJGL dependencies + uses: actions/checkout@v4 + with: + fetch-depth: 3 + - name: Install dependencies # make is necessary for -flto=auto run: | - yum -y install libX11-devel libXt-devel gtk3-devel libdbus-1-dev + git config --global --add safe.directory $(pwd) + DEBIAN_FRONTEND=noninteractive sudo apt-get -yq update + DEBIAN_FRONTEND=noninteractive sudo apt-get -yq install ant awscli curl zstd gcc g++ make mkdir jdk8 curl -L https://cdn.azul.com/zulu/bin/zulu8.${ZULU_BUILD}-linux_x64.tar.gz | tar xz -C jdk8 --strip-components 1 + - name: Install LWJGL dependencies + run: DEBIAN_FRONTEND=noninteractive sudo apt-get -yq -f --allow-unauthenticated --no-install-suggests --no-install-recommends install libgtk-3-dev libatk-bridge2.0-dev libgdk-pixbuf2.0-dev libglu-dev libgl1-mesa-glx libx11-dev libxt-dev libdbus-1-dev -o Dpkg::Options::="--force-overwrite" - name: Restore kotlinc output uses: actions/cache/restore@v3 with: @@ -101,23 +81,16 @@ jobs: - name: Build Java run: ant -emacs compile - name: Build native - run: | - source scl_source enable devtoolset-11 || true - ant -emacs compile-native + run: ant -emacs compile-native - name: Run tests - run: | - source scl_source enable devtoolset-11 || true - ant -emacs tests + run: ant -emacs tests - name: Print test results run: cat bin/test/testng-results.xml if: failure() - name: Run demo with OpenJDK - run: | - source scl_source enable devtoolset-11 || true - ant demo -Dclass=org.lwjgl.demo.util.lz4.HelloLZ4 + run: ant demo -Dclass=org.lwjgl.demo.util.lz4.HelloLZ4 - name: Build GraalVM Native Image run: | - source scl_source enable devtoolset-11 || true mkdir jdk-graalvm curl -L https://download.oracle.com/graalvm/23/latest/graalvm-jdk-23_linux-x64_bin.tar.gz | tar xz -C jdk-graalvm --strip-components 1 jdk-graalvm/bin/native-image -cp \ @@ -130,9 +103,7 @@ jobs: config/native-image \ org.lwjgl.demo.util.lz4.HelloLZ4 --verbose --no-fallback - name: Run demo with GraalVM JIT - run: | - source scl_source enable devtoolset-11 || true - JAVA_HOME=jdk-graalvm ant demo -Dclass=org.lwjgl.demo.util.lz4.HelloLZ4 + run: JAVA_HOME=jdk-graalvm ant demo -Dclass=org.lwjgl.demo.util.lz4.HelloLZ4 - name: Run demo with GraalVM Native Image run: ./org.lwjgl.demo.util.lz4.hellolz4 @@ -187,7 +158,7 @@ jobs: sudo dpkg --add-architecture ${{matrix.CROSS_ARCH}} sudo apt-get update || true - name: Install cross-compilation dependencies - run: sudo apt-get -yq -f --allow-unauthenticated --no-install-suggests --no-install-recommends install libgtk-3-dev:${{matrix.CROSS_ARCH}} libatk-bridge2.0-dev:${{matrix.CROSS_ARCH}} libgdk-pixbuf2.0-dev:${{matrix.CROSS_ARCH}} libglu-dev:${{matrix.CROSS_ARCH}} libgl1-mesa-glx:${{matrix.CROSS_ARCH}} libx11-dev:${{matrix.CROSS_ARCH}} libxt-dev:${{matrix.CROSS_ARCH}} libdbus-1-dev:${{matrix.CROSS_ARCH}} -o Dpkg::Options::="--force-overwrite" + run: DEBIAN_FRONTEND=noninteractive sudo apt-get -yq -f --allow-unauthenticated --no-install-suggests --no-install-recommends install libgtk-3-dev:${{matrix.CROSS_ARCH}} libatk-bridge2.0-dev:${{matrix.CROSS_ARCH}} libgdk-pixbuf2.0-dev:${{matrix.CROSS_ARCH}} libglu-dev:${{matrix.CROSS_ARCH}} libgl1-mesa-glx:${{matrix.CROSS_ARCH}} libx11-dev:${{matrix.CROSS_ARCH}} libxt-dev:${{matrix.CROSS_ARCH}} libdbus-1-dev:${{matrix.CROSS_ARCH}} -o Dpkg::Options::="--force-overwrite" - name: Restore kotlinc output uses: actions/cache/restore@v3 with: