From b1e1bb8f62bbe3fc584c26187b8bbd8187963bcf Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Wed, 25 Oct 2023 23:31:45 +0530 Subject: [PATCH] Build riscv64 jdk11 only --- .github/workflows/maven.yml | 539 +----------------------------------- 1 file changed, 3 insertions(+), 536 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index c3c473d1..2eab0a60 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,375 +15,6 @@ on: jobs: - MacOS-x86_64-Build-JDK8: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - distribution: 'corretto' - java-version: 8 - architecture: x64 - - name: Build with Maven - run: mvn -B --show-version -ntp clean package --file pom.xml - - name: Upload the build - uses: actions/upload-artifact@v3 - with: - name: MacOS-x86_64-Build-JDK8 - path: /Users/runner/work/Brotli4j/ - - MacOS-x86_64-Build-JDK11: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - distribution: 'corretto' - java-version: 11 - architecture: x64 - - name: Build with Maven - run: mvn -B --show-version -ntp --file pom.xml clean package - - MacOS-x86_64-Build-JDK17: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - distribution: 'corretto' - java-version: 17 - architecture: x64 - - name: Build with Maven - run: mvn -B --show-version -ntp --file pom.xml clean package - - Linux-x86_64-Build-JDK8: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: build centos6 - run: docker-compose -f docker/docker-compose.yml run build - - name: Upload the build - uses: actions/upload-artifact@v3 - with: - name: Linux-x86_64-Build-JDK8 - path: /home/runner/work/Brotli4j/ - - Linux-x86_64-Build-JDK11: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: build centos6 - run: docker-compose -f docker/docker-compose11.yml run build - - Linux-x86_64-Build-JDK17: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: build centos6 - run: docker-compose -f docker/docker-compose17.yml run build - - Linux-Aarch64-Build-JDK8: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - env: - cache-name: cache-m2-repository-${{ runner.os }}-jdk8-aarch64 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-pr-${{ env.cache-name }}- - ${{ runner.os }}-pr- - - uses: uraimo/run-on-arch-action@v2.4.0 - name: Run commands - id: runcmd - with: - arch: aarch64 - distro: ubuntu18.04 - - # Not required, but speeds up builds by storing container images in - # a GitHub package registry. - githubToken: ${{ github.token }} - - # Mount the .m2/repository - dockerRunArgs: | - --platform linux/arm64 - --volume "/home/runner/.m2/repository/:/root/.m2/repository" - - # Install dependencies - install: | - apt-get update - apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential - - curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh - jabba install 1.8.0-custom=tgz+https://corretto.aws/downloads/resources/8.352.08.1/amazon-corretto-8.352.08.1-linux-aarch64.tar.gz -o /jdk - - run: | - export JAVA_HOME="/jdk" - chmod +x ./mvnw - ./mvnw -B --show-version -ntp clean package - - - name: Upload the build - uses: actions/upload-artifact@v3 - with: - name: Linux-Aarch64-Build-JDK8 - path: /home/runner/work/Brotli4j/ - - Linux-Aarch64-Build-JDK11: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - env: - cache-name: cache-m2-repository-${{ runner.os }}-jdk11-aarch64 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- - - uses: uraimo/run-on-arch-action@v2.4.0 - name: Run commands - id: runcmd - with: - arch: aarch64 - distro: ubuntu18.04 - - # Not required, but speeds up builds by storing container images in - # a GitHub package registry. - githubToken: ${{ github.token }} - - # Mount the .m2/repository - dockerRunArgs: | - --platform linux/arm64 - --volume "/home/runner/.m2/repository/:/root/.m2/repository" - - # Install dependencies - install: | - apt-get update - apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential - - curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh - jabba install 11.0.0-custom=tgz+https://corretto.aws/downloads/resources/11.0.17.8.1/amazon-corretto-11.0.17.8.1-linux-aarch64.tar.gz -o /jdk - - run: | - export JAVA_HOME="/jdk" - chmod +x ./mvnw - ./mvnw -B --show-version -ntp clean package - - Linux-Aarch64-Build-JDK17: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - env: - cache-name: cache-m2-repository-${{ runner.os }}-jdk17-aarch64 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- - - uses: uraimo/run-on-arch-action@v2.4.0 - name: Run commands - id: runcmd - with: - arch: aarch64 - distro: ubuntu18.04 - - # Not required, but speeds up builds by storing container images in - # a GitHub package registry. - githubToken: ${{ github.token }} - - # Mount the .m2/repository - dockerRunArgs: | - --platform linux/arm64 - --volume "/home/runner/.m2/repository/:/root/.m2/repository" - - # Install dependencies - install: | - apt-get update - apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential - - curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh - jabba install 17.0.0-custom=tgz+https://corretto.aws/downloads/resources/17.0.5.8.1/amazon-corretto-17.0.5.8.1-linux-aarch64.tar.gz -o /jdk - - run: | - export MAVEN_OPTS="-Djdk.lang.Process.launchMechanism=vfork" - export JAVA_HOME="/jdk" - chmod +x ./mvnw - ./mvnw -B --show-version -ntp clean package - - Linux-ArmV7-Build-JDK8: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - env: - cache-name: cache-m2-repository-${{ runner.os }}-jdk8-arm7 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- - - uses: uraimo/run-on-arch-action@v2.4.0 - name: Run commands - id: runcmd - with: - arch: armv7 - distro: ubuntu18.04 - - # Not required, but speeds up builds by storing container images in - # a GitHub package registry. - githubToken: ${{ github.token }} - - # Mount the .m2/repository - dockerRunArgs: | - --platform linux/arm/v7 - --volume "/home/runner/.m2/repository/:/root/.m2/repository" - - # Install dependencies - install: | - apt-get update - apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential - - curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh - jabba install 1.8.0-custom=tgz+https://cdn.azul.com/zulu-embedded/bin/zulu8.66.0.15-ca-jdk8.0.352-linux_aarch32hf.tar.gz -o /jdk - - run: | - export JAVA_HOME="/jdk" - chmod +x ./mvnw - ./mvnw -B --show-version -ntp clean package - - - name: Upload the build - uses: actions/upload-artifact@v3 - with: - name: Linux-ArmV7-Build-JDK8 - path: /home/runner/work/Brotli4j/ - - Linux-ArmV7-Build-JDK11: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - env: - cache-name: cache-m2-repository-${{ runner.os }}-jdk11-armv7 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- - - uses: uraimo/run-on-arch-action@v2.4.0 - name: Run commands - id: runcmd - with: - arch: armv7 - distro: ubuntu18.04 - - # Not required, but speeds up builds by storing container images in - # a GitHub package registry. - githubToken: ${{ github.token }} - - # Mount the .m2/repository - dockerRunArgs: | - --platform linux/arm/v7 - --volume "/home/runner/.m2/repository/:/root/.m2/repository" - - # Install dependencies - install: | - apt-get update - apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential - - curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh - jabba install 11.0.0-custom=tgz+https://cdn.azul.com/zulu-embedded/bin/zulu11.60.19-ca-jdk11.0.17-linux_aarch32hf.tar.gz -o /jdk - - run: | - export JAVA_HOME="/jdk" - chmod +x ./mvnw - ./mvnw -B --show-version -ntp clean package - - Linux-s390x-Build-JDK8: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - env: - cache-name: cache-m2-repository-${{ runner.os }}-jdk8-s390x - with: - path: ~/.m2/repository - key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- - - uses: uraimo/run-on-arch-action@v2.4.0 - name: Run commands - id: runcmd - with: - arch: s390x - distro: ubuntu18.04 - - # Not required, but speeds up builds by storing container images in - # a GitHub package registry. - githubToken: ${{ github.token }} - - # Mount the .m2/repository - dockerRunArgs: | - --platform linux/s390x - --volume "/home/runner/.m2/repository/:/root/.m2/repository" - - # Install dependencies - install: | - apt-get update - apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential openjdk-8-jdk - - run: | - chmod +x ./mvnw - ./mvnw -B --show-version -ntp clean package - - - name: Upload the build - uses: actions/upload-artifact@v3 - with: - name: Linux-s390x-Build-JDK8 - path: /home/runner/work/Brotli4j/ - - Linux-s390x-Build-JDK11: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - env: - cache-name: cache-m2-repository-${{ runner.os }}-jdk8-s390x - with: - path: ~/.m2/repository - key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- - - uses: uraimo/run-on-arch-action@v2.4.0 - name: Run commands - id: runcmd - with: - arch: s390x - distro: ubuntu18.04 - - # Not required, but speeds up builds by storing container images in - # a GitHub package registry. - githubToken: ${{ github.token }} - - # Mount the .m2/repository - dockerRunArgs: | - --platform linux/s390x - --volume "/home/runner/.m2/repository/:/root/.m2/repository" - - # Install dependencies - install: | - apt-get update - apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential openjdk-11-jdk - - run: | - chmod +x ./mvnw - ./mvnw -B --show-version -ntp clean package - Linux-riscv64-Build-JDK11: runs-on: ubuntu-latest steps: @@ -420,170 +51,6 @@ jobs: run: | export MAVEN_OPTS="-Djdk.lang.Process.launchMechanism=vfork" chmod +x ./mvnw - ./mvnw -B --show-version -ntp clean package - - - uses: uraimo/run-on-arch-action@v2.4.0 - name: Test on JDK 8 - id: test - with: - arch: aarch64 - distro: ubuntu20.04 - - # Not required, but speeds up builds by storing container images in - # a GitHub package registry. - githubToken: ${{ github.token }} - - # Mount the .m2/repository - dockerRunArgs: | - --platform linux/aarch64 - --volume "/home/runner/.m2/repository/:/root/.m2/repository" - - # Install dependencies - install: | - apt-get update - apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential openjdk-8-jdk - - run: | - export MAVEN_OPTS="-Djdk.lang.Process.launchMechanism=vfork" - chmod +x ./mvnw - # Build native-linux-aarch64 only - ./mvnw -B --show-version -ntp clean package -pl :native-linux-aarch64 -DskipTests - # Test with JDK 8 - ./mvnw -B --show-version -ntp surefire:test - - # RISC-V doesn't upload the JDK 8 build because JDK 8 doesn't exist on RISC-V. Instead, we upload - # the JDK 11 build. It should work on JDK 8 as well, as we are testing it on all other platforms. - - name: Upload the build - uses: actions/upload-artifact@v3 - with: - name: Linux-riscv64-Build-JDK11 - path: /home/runner/work/Brotli4j/ - - Linux-riscv64-Build-JDK17: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - env: - cache-name: cache-m2-repository-${{ runner.os }}-jdk17-riscv64 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- - - uses: uraimo/run-on-arch-action@v2.4.0 - name: Run commands - id: runcmd - with: - arch: riscv64 - distro: ubuntu20.04 - - # Not required, but speeds up builds by storing container images in - # a GitHub package registry. - githubToken: ${{ github.token }} - - # Mount the .m2/repository - dockerRunArgs: | - --platform linux/riscv64 - --volume "/home/runner/.m2/repository/:/root/.m2/repository" - # Install dependencies - install: | - apt-get update - apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential openjdk-17-jdk - - run: | - export MAVEN_OPTS="-Djdk.lang.Process.launchMechanism=vfork" - chmod +x ./mvnw - ./mvnw -B --show-version -ntp clean package - - Linux-riscv64-Build-JDK21: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - env: - cache-name: cache-m2-repository-${{ runner.os }}-jdk21-riscv64 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-pr-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-pr-${{ matrix.arch }}-pr-${{ env.cache-name }}-pr- - - uses: uraimo/run-on-arch-action@v2.4.0 - name: Run commands - id: runcmd - with: - arch: riscv64 - distro: ubuntu22.04 - - # Not required, but speeds up builds by storing container images in - # a GitHub package registry. - githubToken: ${{ github.token }} - - # Mount the .m2/repository - dockerRunArgs: | - --platform linux/riscv64 - --volume "/home/runner/.m2/repository/:/root/.m2/repository" - - # Install dependencies - install: | - apt-get update - apt-get install -q -y curl gnupg2 autoconf automake libtool make tar git cmake build-essential - - curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh - jabba install 21-custom=tgz+https://api.adoptium.net/v3/binary/latest/21/ea/linux/riscv64/jdk/hotspot/normal/eclipse?project=jdk -o /jdk - - run: | - export JAVA_HOME="/jdk" - chmod +x ./mvnw - ./mvnw -B --show-version -ntp clean package - - Windows-x86_64-Build-JDK8: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - distribution: 'corretto' - java-version: 8 - architecture: x64 - - name: Enable Developer Command Prompt - uses: ilammy/msvc-dev-cmd@v1.12.0 - - name: Build with Maven - run: mvn -B --show-version -ntp clean package --file pom.xml - - name: Upload the build - uses: actions/upload-artifact@v3 - with: - name: Windows-x86_64-Build-JDK8 - path: D:\a\Brotli4j\ - - - Windows-x86_64-Build-JDK11: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - distribution: 'corretto' - java-version: 11 - architecture: x64 - - name: Enable Developer Command Prompt - uses: ilammy/msvc-dev-cmd@v1.12.0 - - name: Build with Maven - run: mvn -B --show-version -ntp --file pom.xml clean package - - Windows-x86_64-Build-JDK17: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - distribution: 'corretto' - java-version: 17 - architecture: x64 - - name: Enable Developer Command Prompt - uses: ilammy/msvc-dev-cmd@v1.12.0 - - name: Build with Maven - run: mvn -B --show-version -ntp --file pom.xml clean package + ./mvnw -B --show-version -ntp clean package. + apt-get install -q -y openjdk-8-jdk + java --version