From d143b83c7df7436426b07eaffc3c425f816752a3 Mon Sep 17 00:00:00 2001 From: "lvfei.lv" Date: Mon, 8 Jul 2024 11:12:34 +0800 Subject: [PATCH] [Misc] Reduce runner permissions Summary: reduce arm runner permissions and update actions config Testing: CI pipline Reviewers: lei.yul, sendaoYan Issue: https://github.com/dragonwell-project/dragonwell11/issues/840 --- .github/workflows/build-linux.yml | 2 +- .github/workflows/build-riscv.yml | 19 +++++++++++++++---- .github/workflows/main.yml | 4 +--- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 567b79dfaf1..d063eacef29 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -69,7 +69,6 @@ jobs: build-linux: name: build runs-on: ${{fromJson(inputs.runs-on)}} - #runs-on: 'ubuntu-20.04' strategy: fail-fast: false @@ -118,6 +117,7 @@ jobs: fi sudo apt-get install -y gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }} $extra_packages sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }} + if: inputs.platform != 'linux-aarch64' - name: 'Configure' run: > diff --git a/.github/workflows/build-riscv.yml b/.github/workflows/build-riscv.yml index 51221dd153d..466880cad61 100644 --- a/.github/workflows/build-riscv.yml +++ b/.github/workflows/build-riscv.yml @@ -61,9 +61,7 @@ on: jobs: build-linux: name: build - runs-on: [self-hosted , X64] - container: - image: docker.io/alibabadragonwelljdk/centos7_gcc7_build_image:latest + runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -74,6 +72,19 @@ jobs: - name: 'Checkout the JDK source' uses: actions/checkout@v2 + - name: 'Install Boot JDK' + run: | + wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/11.0.23.20.9/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_linux.tar.gz -O jdk.tar.gz + mkdir -p /usr/lib/jvm/jdk-11 + tar zxvf jdk.tar.gz -C /usr/lib/jvm/jdk-11 --strip-components=1 + rm -rf jdk.tar.gz + + - name: 'Install riscv64 toolchain' + run: | + wget https://compiler-tools.oss-cn-hangzhou.aliyuncs.com/riscv64-build/riscv_opt.tar.gz -O riscv_opt.tar.gz + tar zxvf riscv_opt.tar.gz -C /opt/ + rm -rf riscv_opt.tar.gz + - name: 'Configure' run: > LD_LIBRARY_PATH=/opt/riscv_toolchain_linux/lib64 @@ -88,7 +99,7 @@ jobs: --without-version-pre --with-version-build=9 --with-version-patch=14 - --with-boot-jdk=/usr/lib/jvm/jdk-10 + --with-boot-jdk=/usr/lib/jvm/jdk-11 --with-native-debug-symbols=external --with-jvm-variants=server --disable-warnings-as-errors diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 846e521e561..32a0f7f229e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,9 +35,7 @@ on: platforms: description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")' required: true - #default: 'linux-x64, linux-cross-compile, windows-x64' - #default: 'linux-x64, linux-aarch64' - default: 'linux aarch64' + default: 'linux-x64, linux-aarch64, linux-cross-compile, windows-x64' configure-arguments: description: 'Additional configure arguments' required: false