From a2a69e54e55256a5c32428e255033d424b89ba7e Mon Sep 17 00:00:00 2001 From: Shaojun Liu <61072813+liu-shaojun@users.noreply.github.com> Date: Mon, 29 Aug 2022 08:20:10 +0800 Subject: [PATCH] cicd: add a new workflow called PR_Validation (#5546) * add PR_Validation workflow * test * test * test * test * test * test * test * add friesian ut to PR validation * revert changes * add dllib ut * test * revert --- .github/workflows/PR_validation.yml | 70 +++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/PR_validation.yml diff --git a/.github/workflows/PR_validation.yml b/.github/workflows/PR_validation.yml new file mode 100644 index 00000000000..3dec3fd65ee --- /dev/null +++ b/.github/workflows/PR_validation.yml @@ -0,0 +1,70 @@ +name: PR Validation + +on: + push: + paths: + - 'scala/friesian/**' + - '.github/actions/friesian-scala-ut-action/action.yml' + - 'scala/dllib/**' + - '.github/actions/dllib-scala-ut-action/action.yml' + pull_request: + branches: [ main ] + paths: + - 'scala/friesian/**' + - '.github/actions/friesian-scala-ut-action/action.yml' + - 'scala/dllib/**' + - '.github/actions/dllib-scala-ut-action/action.yml' + +permissions: + contents: read + packages: write + +jobs: + changes: + name: Paths filter + runs-on: [self-hosted, Gondolin, ubuntu-20.04-lts] + outputs: + friesian: ${{ steps.filter.outputs.friesian }} + dllib: ${{ steps.filter.outputs.dllib }} + steps: + - uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + friesian: + - 'scala/friesian/**' + - '.github/actions/friesian-scala-ut-action/action.yml' + dllib: + - 'scala/dllib/**' + - '.github/actions/dllib-scala-ut-action/action.yml' + + + Friesian-Scala-UT: + needs: changes + if: ${{ needs.changes.outputs.friesian == 'true' }} + runs-on: [ self-hosted, ubuntu-20.04-lts, CLX, AVX512, Ettenmoors ] + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK8 + uses: ./.github/actions/jdk-setup-action + - name: Set up maven + uses: ./.github/actions/maven-setup-action + - name: Run test + uses: ./.github/actions/dllib-scala-ut-action + + + Dllib-Scala-UT: + needs: changes + if: ${{ needs.changes.outputs.dllib == 'true' }} + runs-on: [ self-hosted, Gondolin, ubuntu-20.04-lts ] + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK8 + uses: ./.github/actions/jdk-setup-action + - name: Set up maven + uses: ./.github/actions/maven-setup-action + - name: Run test + uses: ./.github/actions/dllib-scala-ut-action \ No newline at end of file