diff --git a/.github/actions/compile/action.yml b/.github/actions/compile/action.yml new file mode 100644 index 0000000..9660cae --- /dev/null +++ b/.github/actions/compile/action.yml @@ -0,0 +1,47 @@ +name: Run a specific build configuration +inputs: + machine: + required: true + bsp: + required: true + cache_dir: + required: true + manifest_url: + required: true + manifest_branch: + required: true + qli_version: + required: true +runs: + using: "composite" + steps: + - name: Get manifest file + shell: bash + run: | + git clone --depth=1 ${{inputs.manifest_url}} -b ${{inputs.manifest_branch}} + cd qcom-manifest + MANIFEST_FILE=$(ls *${{inputs.qli_version}}*.xml | sort | grep -v -e realtime-linux -e qim-product-sdk -e robotics-product-sdk | tail -1) + echo "Manifest file: ${MANIFEST_FILE}" + echo "MANIFEST_FILE=${MANIFEST_FILE}" >> "$GITHUB_ENV" + + - name: Setup workspace + shell: bash + run: | + mkdir QLI + cd QLI + repo init -u ${{inputs.manifest_url}} -b ${{inputs.manifest_branch}} -m ${MANIFEST_FILE} + repo sync + mkdir -p ${{inputs.cache_dir}}/{downloads,sstate-cache} + ln -s ${{inputs.cache_dir}}/downloads + ln -s ${{inputs.cache_dir}}/sstate-cache + + - name: Build QLI + shell: bash + run: | + cd QLI + # FIXME: apply_poky_patches() fails in setup-environment and it's not + # needed, so skip it for now, until it's fixed properly. + sed -i '/ apply_poky_patches/d' setup-environment + MACHINE=${{ inputs.machine }} DISTRO=qcom-wayland QCOM_SELECTED_BSP=${{ inputs.bsp }} source setup-environment + bitbake-layers add-layer $GITHUB_WORKSPACE + bitbake qcom-console-image diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1abff08..71a137a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,8 +11,34 @@ env: QLI_VERSION: QLI.1.4 jobs: + build_warmup: + if: github.repository == 'qualcomm-linux/meta-qcom-3rdparty' + runs-on: [self-hosted, x86] + strategy: + fail-fast: true + matrix: + machine: + - qcs8300-ride-sx + bsp: + - custom + - base + steps: + - uses: actions/checkout@v4 + + - name: Run build + uses: ./.github/actions/compile + with: + machine: ${{matrix.machine}} + bsp: ${{matrix.bsp}} + cache_dir: ${CACHE_DIR} + manifest_url: ${MANIFEST_URL} + manifest_branch: ${MANIFEST_BRANCH} + qli_version: ${QLI_VERSION} + build: + needs: build_warmup if: github.repository == 'qualcomm-linux/meta-qcom-3rdparty' + runs-on: [self-hosted, x86] strategy: fail-fast: true matrix: @@ -22,42 +48,20 @@ jobs: - qcs9075-ride-sx - qcs9075-rb8-core-kit - qcs9100-ride-sx - - qcs8300-ride-sx bsp: - custom include: - machine: qcs9100-ride-sx bsp: base - - machine: qcs8300-ride-sx - bsp: base - runs-on: [self-hosted, x86] steps: - uses: actions/checkout@v4 - - name: Get manifest file - run: | - git clone --depth=1 ${MANIFEST_URL} -b ${MANIFEST_BRANCH} - cd qcom-manifest - MANIFEST_FILE=$(ls *${QLI_VERSION}*.xml | sort | grep -v -e realtime-linux -e qim-product-sdk -e robotics-product-sdk | tail -1) - echo "Manifest file: ${MANIFEST_FILE}" - echo "MANIFEST_FILE=${MANIFEST_FILE}" >> "$GITHUB_ENV" - - - name: Setup workspace - run: | - mkdir QLI - cd QLI - repo init -u ${MANIFEST_URL} -b ${MANIFEST_BRANCH} -m ${MANIFEST_FILE} - repo sync - mkdir -p ${CACHE_DIR}/{downloads,sstate-cache} - ln -s ${CACHE_DIR}/downloads - ln -s ${CACHE_DIR}/sstate-cache - - - name: Build QLI - run: | - cd QLI - # FIXME: apply_poky_patches() fails in setup-environment and it's not - # needed, so skip it for now, until it's fixed properly. - sed -i '/ apply_poky_patches/d' setup-environment - MACHINE=${{ matrix.machine }} DISTRO=qcom-wayland QCOM_SELECTED_BSP=${{ matrix.bsp }} source setup-environment - bitbake-layers add-layer $GITHUB_WORKSPACE - bitbake qcom-console-image + - name: Run build + uses: ./.github/actions/compile + with: + machine: ${{matrix.machine}} + bsp: ${{matrix.bsp}} + cache_dir: ${CACHE_DIR} + manifest_url: ${MANIFEST_URL} + manifest_branch: ${MANIFEST_BRANCH} + qli_version: ${QLI_VERSION} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 412de24..2e7c809 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,7 +3,7 @@ name: Build on push on: push: branches: - - kirkstone + - scarthgap jobs: build: