From 426bc86e21d670c708b30e1bf2cdb1f83ee32c75 Mon Sep 17 00:00:00 2001 From: Abdoulbari Zakir Date: Thu, 22 Feb 2024 11:34:01 +0100 Subject: [PATCH] split --- .github/workflows/build-userguide.yml | 5 +++++ .github/workflows/centos7.yml | 2 +- .github/workflows/new_release.yml | 3 +-- .github/workflows/oracle8.yml | 2 +- .github/workflows/ubuntu.yml | 4 +++- .github/workflows/windows-vcpkg.yml | 7 +++++++ 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-userguide.yml b/.github/workflows/build-userguide.yml index 0adce086ec..6845e63bb3 100644 --- a/.github/workflows/build-userguide.yml +++ b/.github/workflows/build-userguide.yml @@ -12,6 +12,9 @@ on: run-tests: required: true type: string + target_branch: + required: true + type: string env: IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }} @@ -25,6 +28,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + ref: ${{ inputs.target_branch}} - name: Set up Python uses: actions/setup-python@v4 diff --git a/.github/workflows/centos7.yml b/.github/workflows/centos7.yml index 9bdd69dff6..0cb8996c0e 100644 --- a/.github/workflows/centos7.yml +++ b/.github/workflows/centos7.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout run: | - git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b $GITHUB_REF_NAME . + git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b ${{ github.event.inputs.target_branch }} . - name: Install gcc 10 run: | diff --git a/.github/workflows/new_release.yml b/.github/workflows/new_release.yml index c65ca9dc1e..0d4d815c33 100644 --- a/.github/workflows/new_release.yml +++ b/.github/workflows/new_release.yml @@ -59,7 +59,6 @@ jobs: uses: ./.github/workflows/centos7.yml with: run-tests: ${{ inputs.run-tests }} - target_branch: ${{ inputs.target_branch }} oracle8: name: Release - oracle8 @@ -67,7 +66,7 @@ jobs: uses: ./.github/workflows/oracle8.yml with: run-tests: ${{ inputs.run-tests }} - target_branch: ${{ inputs.target_branch }} + user_guide: name: User Guide diff --git a/.github/workflows/oracle8.yml b/.github/workflows/oracle8.yml index e3c242c1f7..ac840590b4 100644 --- a/.github/workflows/oracle8.yml +++ b/.github/workflows/oracle8.yml @@ -44,7 +44,7 @@ jobs: - name: Checkout run: | - git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b $GITHUB_REF_NAME . + git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b ${{ github.event.inputs.target_branch }} . - name: Config OR-Tools URL run: | diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index ce97851457..a3d808df8e 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -26,6 +26,7 @@ env: IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }} RUN_SIMPLE_TESTS: ${{ github.event_name == 'push' || inputs.run-tests == 'true' }} RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || inputs.run-tests == 'true' }} + REF: ${{ inputs.target_branch =='' && github.ref || inputs.target_branch}} jobs: @@ -41,7 +42,8 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: ${{ inputs.target_branch}} + ref: ${{ env.REF }} + - name: ccache uses: hendrikmuhs/ccache-action@v1.2 with: diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 22a58dc680..e202c8c7e1 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -17,12 +17,16 @@ on: run-tests: required: true type: string + target_branch: + required: true + type: string env: GITHUB_TOKEN: ${{ github.token }} IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }} RUN_SIMPLE_TESTS: ${{ github.event_name == 'push' || inputs.run-tests == 'true' }} RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || inputs.run-tests == 'true' }} + REF: ${{ inputs.target_branch =='' && github.ref || inputs.target_branch}} jobs: @@ -40,7 +44,10 @@ jobs: runs-on: windows-latest steps: + - uses: actions/checkout@v3 + with: + ref: ${{ env.REF }} - name: Config OR-Tools URL run: |