diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11a7ffd93..b5fb32a3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,10 +35,6 @@ jobs: build_linux: name: Linux runs-on: ubuntu-latest - env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: 'true' - container: - image: ${{ matrix.image }} strategy: fail-fast: false matrix: @@ -80,24 +76,23 @@ jobs: variant: bisheng image: adoptopenjdk/centos7_build_image steps: - # pinned at v3 to as Node.js 20.x is not supported on Centos 7 - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: actions/checkout@v4 - - name: Build Linux - run: ./build-farm/make-adopt-build-farm.sh - env: - JAVA_TO_BUILD: ${{ matrix.version }} - ARCHITECTURE: x64 - VARIANT: ${{ matrix.variant }} - TARGET_OS: ${{ matrix.os }} - FILENAME: OpenJDK.tar.gz - # Don't set the OS as we use both linux and alpine-linux - PLATFORM_CONFIG_LOCATION: adoptium/temurin-build/master/build-farm/platform-specific-configurations - BUILD_ARGS: --create-sbom - CONFIGURE_ARGS: --with-native-debug-symbols=none - - # pinned at v3 to as Node.js 20.x is not supported on Centos 7 - - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + - name: Build Linux within container image "${{ matrix.image }}" + run: | + docker run --rm -w /home/jenkins -v "$PWD":"/home/jenkins" \ + -e "JAVA_TO_BUILD=${{ matrix.version }}" \ + -e "ARCHITECTURE=x64" \ + -e "VARIANT=${{ matrix.variant }}" \ + -e "TARGET_OS=${{ matrix.os }}" \ + -e "FILENAME=OpenJDK.tar.gz" \ + -e "PLATFORM_CONFIG_LOCATION=adoptium/temurin-build/master/build-farm/platform-specific-configurations" \ + -e "BUILD_ARGS=--create-sbom" \ + -e "CONFIGURE_ARGS=--with-native-debug-symbols=none" \ + "${{ matrix.image }}" \ + ./build-farm/make-adopt-build-farm.sh + + - uses: actions/upload-artifact@v4 name: Collect and Archive Artifacts with: name: ${{matrix.version}}-${{matrix.os}}-${{matrix.variant}} @@ -110,17 +105,33 @@ jobs: - name: Set root of jdk image dir run: | imageroot=$(find "${HOME}/JDK" -name release -type f) - echo "TEST_JDK_HOME=$(dirname "${imageroot}")" >> "$GITHUB_ENV" - - name: Smoke test - uses: adoptium/run-aqa@6bacb4e732ad546eda1b09665b9067cdc87651f4 # v2 + # TEST_JDK_HOME needs to be mapped to the docker container /home/jenkins mapping + echo "TEST_JDK_HOME=$(dirname "${imageroot}")" | sed "s,${HOME},/home/jenkins," >> "$GITHUB_ENV" + + - name: Checkout aqa-tests repo + uses: actions/checkout@v4 with: - build_list: 'functional/buildAndPackage' - target: '_extended.functional' - vendor_testRepos: "${{ github.event.pull_request.head.repo.html_url }}.git" - vendor_testBranches: "${{ github.head_ref }}" - vendor_testDirs: "/test/functional" - # pinned at v3 to as Node.js 20.x is not supported on Centos 7 - - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + repository: adoptium/aqa-tests + path: aqa-tests + - name: Run Smoke test within container image "${{ matrix.image }}" + env: + VENDOR_REPOS: ${{ github.event.pull_request.head.repo.html_url }}.git + VENDOR_BRANCH: ${{ github.head_ref }} + run: | + WORK_DIR="${PWD//${HOME}//home/jenkins}" + docker run --rm -w /home/jenkins -v "$HOME":"/home/jenkins" \ + -e "TEST_JDK_HOME=${TEST_JDK_HOME}" \ + -e "BUILD_LIST=functional/buildAndPackage" \ + "${{ matrix.image }}" \ + sh -c "cd ${WORK_DIR}/aqa-tests && \ + ./get.sh --vendor_repos ${VENDOR_REPOS} \ + --vendor_branches ${VENDOR_BRANCH} \ + --vendor_dirs /test/functional && \ + cd TKG && \ + make compile && \ + make _extended.functional" + + - uses: actions/upload-artifact@v4 name: Collect and Archive SmokeTest Results if: failure() with: