From 0da9315769c12e22c5f90b355832ae7e98768419 Mon Sep 17 00:00:00 2001 From: Vaishnavi Subhedar - Xilinx <141360387+SubhedarV@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:14:30 -0700 Subject: [PATCH] ALLL BUILDSS --- .github/workflows/tarrr_file.yml | 154 ++++++++++++++++--------------- 1 file changed, 78 insertions(+), 76 deletions(-) diff --git a/.github/workflows/tarrr_file.yml b/.github/workflows/tarrr_file.yml index 19813d9e575..a6f282dc252 100644 --- a/.github/workflows/tarrr_file.yml +++ b/.github/workflows/tarrr_file.yml @@ -1,81 +1,79 @@ name: Test Docker -env: - RELEASE: '2021.1' - PIPELINE: 'xrt' - ENV: 'test' - -on: - workflow_dispatch: +env: + RELEASE: '2021.1' + PIPELINE: 'xrt' + ENV: 'test' -jobs: - build: - strategy: - matrix: - include: - # - os: centos78 - # packageType: rpm - # os_ver: centos_7.8 - - os: centos8 - packageType: rpm - os_ver: centos_8.1 - # - os: rhel9 - # packageType: rpm - # os_ver: rhel_9.1 - - os: ubuntu2004 - packageType: deb - os_ver: ubuntu_20.04 - - os: ubuntu2204 - packageType: deb - os_ver: ubuntu_22.04 - # - os: amazonlinux-20202011111 - # packageType: rpm - # os_ver: amazonlinux20202011111 - # - os: ubuntu1804 - # packageType: deb - # os_ver: ubuntu_18.04 - - runs-on: [self-hosted, Ubuntu-22.04] - steps: - - name: Set env variables - run: | - echo "Setting environment variables..." - # echo "XRT_VERSION_PATCH=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV - echo "XRT_VERSION_PATCH=$(($GITHUB_RUN_NUMBER+717))" >> $GITHUB_ENV - echo "PATH=/usr/bin:$PATH" >> $GITHUB_ENV +on: + workflow_dispatch: - - name: Checkout PR - uses: actions/checkout@v3 - with: - # repository: "${{ github.event.pull_request.head.repo.full_name }}" - # ref: "${{ github.event.pull_request.head.ref }}" - fetch-depth: 0 - path: ${{ github.workspace }}/${{ env.XRT_VERSION_PATCH }} - submodules: recursive - - - name: Checkout private repository +jobs: + build: + strategy: + matrix: + include: + - os: centos78 + packageType: rpm + os_ver: centos_7.8 + - os: centos8 + packageType: rpm + os_ver: centos_8.1 + # - os: rhel9 + # packageType: rpm + # os_ver: rhel_9.1 + - os: ubuntu2004 + packageType: deb + os_ver: ubuntu_20.04 + - os: ubuntu2204 + packageType: deb + os_ver: ubuntu_22.04 + - os: amazonlinux-20202011111 + packageType: rpm + os_ver: amazonlinux20202011111 + - os: ubuntu1804 + packageType: deb + os_ver: ubuntu_18.04 + + runs-on: [self-hosted, Ubuntu-22.04] + steps: + - name: Set env variables + run: | + echo "Setting environment variables..." + echo "XRT_VERSION_PATCH=$(($GITHUB_RUN_NUMBER+717))" >> $GITHUB_ENV + echo "PATH=/usr/bin:$PATH" >> $GITHUB_ENV + + - name: Checkout PR uses: actions/checkout@v3 - with: - repository: actions-int/composite-workflows - github-server-url: ${{ secrets.SERVER_URL }} - token: ${{ secrets.ACCESS_TOKEN }} - path: composite-workflows - ref: image - - - name: XRT build - uses: ./composite-workflows/build - with: - pipeline: ${{ env.PIPELINE }} - osVersion: ${{ matrix.os }} - packageType: ${{ matrix.packageType }} - os_ver: ${{ matrix.os_ver }} - workspace: ${{ github.workspace }} - buildNumber: ${{ env.XRT_VERSION_PATCH }} - accessToken: ${{ secrets.ACCESS_TOKEN }} - github-server-url: ${{ secrets.SERVER_URL }} - appConfig: ${{ secrets.APP_CONFIG }} - appConfig1: ${{ secrets.APP_CONFIG1 }} - appConfig2: ${{ secrets.APP_CONFIG2 }} - appConfig3: ${{ secrets.APP_CONFIG3 }} + with: + ref: '2021.1' + fetch-depth: 0 + path: ${{ github.workspace }}/${{ env.XRT_VERSION_PATCH }} + submodules: recursive + + - name: Checkout private repository + uses: actions/checkout@v3 + with: + repository: actions-int/composite-workflows + github-server-url: ${{ secrets.SERVER_URL }} + token: ${{ secrets.ACCESS_TOKEN }} + path: composite-workflows + ref: image + + - name: XRT build + uses: ./composite-workflows/build + with: + pipeline: ${{ env.PIPELINE }} + osVersion: ${{ matrix.os }} + packageType: ${{ matrix.packageType }} + os_ver: ${{ matrix.os_ver }} + workspace: ${{ github.workspace }} + buildNumber: ${{ env.XRT_VERSION_PATCH }} + accessToken: ${{ secrets.ACCESS_TOKEN }} + github-server-url: ${{ secrets.SERVER_URL }} + appConfig: ${{ secrets.APP_CONFIG }} + appConfig1: ${{ secrets.APP_CONFIG1 }} + appConfig2: ${{ secrets.APP_CONFIG2 }} + appConfig3: ${{ secrets.APP_CONFIG3 }} package-download: @@ -153,8 +151,12 @@ jobs: base_image="centos:8" elif [[ $package_file == *ubuntu_20.04* ]]; then base_image="ubuntu:20.04" - else + elif [[ $package_file == *ubuntu_22.04* ]]; then base_image="ubuntu:22.04" + elif [[ $package_file == *amazonlinux20202011111* ]]; then + base_image="amazonlinux:2" + else + base_image="ubuntu:18.04" fi docker build --build-arg PACKAGE_FILE=$(basename $package_file) --build-arg BASE_IMAGE=$base_image -t xrt_image:$image_tag -f ${{ github.workspace }}/${{ env.XRT_VERSION_PATCH }}/Dockerfile/Dockerfile ${{ github.workspace }}/${{ env.XRT_VERSION_PATCH }}/Dockerfile done @@ -173,4 +175,4 @@ jobs: docker tag xrt_image:$image_tag registry.amd.com/buildops/xrt_image:$image_tag docker push registry.amd.com/buildops/xrt_image:$image_tag done - shell: bash + shell: bash