diff --git a/.github/workflows/centos.yml b/.github/workflows/centos.yml index 838c93f..c342cf8 100644 --- a/.github/workflows/centos.yml +++ b/.github/workflows/centos.yml @@ -44,9 +44,10 @@ jobs: shell: bash run: | OR_REPO="https://github.com/google/or-tools.git" - OR_REF="v9.10" + TAGNAME="${{ github.event.release.tag_name }}" + TAGNAME_WITHOUT_SUFFIX=${TAGNAME%%-*} echo "OR_REPO=$OR_REPO" >> $GITHUB_ENV - echo "OR_REF=$OR_REF" >> $GITHUB_ENV + echo "OR_REF=$TAGNAME_WITHOUT_SUFFIX" >> $GITHUB_ENV - name: set or-tools repo vars not release if: ${{ env.RELEASE_CREATED == 'false' }} diff --git a/.github/workflows/oracle.yml b/.github/workflows/oracle.yml index 6f32235..0517715 100644 --- a/.github/workflows/oracle.yml +++ b/.github/workflows/oracle.yml @@ -110,9 +110,10 @@ jobs: shell: bash run: | OR_REPO="https://github.com/google/or-tools.git" - OR_REF="v9.10" + TAGNAME="${{ github.event.release.tag_name }}" + TAGNAME_WITHOUT_SUFFIX=${TAGNAME%%-*} echo "OR_REPO=$OR_REPO" >> $GITHUB_ENV - echo "OR_REF=$OR_REF" >> $GITHUB_ENV + echo "OR_REF=$TAGNAME_WITHOUT_SUFFIX" >> $GITHUB_ENV - name: set or-tools repo vars not release if: ${{ env.RELEASE_CREATED == 'false' }} diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 0f885a3..f21ab5f 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -59,9 +59,10 @@ jobs: shell: bash run: | OR_REPO="https://github.com/google/or-tools.git" - OR_REF="v9.10" + TAGNAME="${{ github.event.release.tag_name }}" + TAGNAME_WITHOUT_SUFFIX=${TAGNAME%%-*} echo "OR_REPO=$OR_REPO" >> $GITHUB_ENV - echo "OR_REF=$OR_REF" >> $GITHUB_ENV + echo "OR_REF=$TAGNAME_WITHOUT_SUFFIX" >> $GITHUB_ENV - name: set or-tools repo vars not release if: ${{ env.RELEASE_CREATED == 'false' }} diff --git a/.github/workflows/windows-cpp.yml b/.github/workflows/windows-cpp.yml index 52aef76..b8ddf12 100644 --- a/.github/workflows/windows-cpp.yml +++ b/.github/workflows/windows-cpp.yml @@ -37,19 +37,30 @@ jobs: os: [windows-latest] sirius-release-tag: [ antares-integration-v1.4 ] steps: - - name: Checkout or-tools + - name: set or-tools repo vars release + if: ${{ env.RELEASE_CREATED == 'true' }} + shell: bash + run: | + OR_REPO="https://github.com/google/or-tools.git" + TAGNAME="${{ github.event.release.tag_name }}" + TAGNAME_WITHOUT_SUFFIX=${TAGNAME%%-*} + echo "OR_REPO=$OR_REPO" >> $GITHUB_ENV + echo "OR_REF=$TAGNAME_WITHOUT_SUFFIX" >> $GITHUB_ENV + + - name: set or-tools repo vars not release if: ${{ env.RELEASE_CREATED == 'false' }} - uses: actions/checkout@v4 - with: - repository: rte-france/or-tools - ref: ${{ github.event.inputs.rtefrance_ortools_branch || 'main' }} + shell: bash + run: | + OR_REPO="https://github.com/rte-france/or-tools.git" + OR_REF=${{ github.event.inputs.rtefrance_ortools_branch || 'main' }} + echo "OR_REPO=$OR_REPO" >> $GITHUB_ENV + echo "OR_REF=$OR_REF" >> $GITHUB_ENV - name: Checkout or-tools - if: ${{ env.RELEASE_CREATED == 'true' }} uses: actions/checkout@v4 with: - repository: google/or-tools - ref: 'stable' + repository: ${{ env.OR_REPO }} + ref: ${{ env.OR_REF }} - name: Checkout this repository uses: actions/checkout@v4 diff --git a/.github/workflows/windows-python.yml b/.github/workflows/windows-python.yml index 1db16bb..0888a16 100644 --- a/.github/workflows/windows-python.yml +++ b/.github/workflows/windows-python.yml @@ -39,19 +39,30 @@ jobs: { version: "3.11", dir: Python311 }, ] steps: - - name: Checkout or-tools + - name: set or-tools repo vars release + if: ${{ env.RELEASE_CREATED == 'true' }} + shell: bash + run: | + OR_REPO="https://github.com/google/or-tools.git" + TAGNAME="${{ github.event.release.tag_name }}" + TAGNAME_WITHOUT_SUFFIX=${TAGNAME%%-*} + echo "OR_REPO=$OR_REPO" >> $GITHUB_ENV + echo "OR_REF=$TAGNAME_WITHOUT_SUFFIX" >> $GITHUB_ENV + + - name: set or-tools repo vars not release if: ${{ env.RELEASE_CREATED == 'false' }} - uses: actions/checkout@v4 - with: - repository: rte-france/or-tools - ref: ${{ github.event.inputs.rtefrance_ortools_branch || 'main' }} + shell: bash + run: | + OR_REPO="https://github.com/rte-france/or-tools.git" + OR_REF=${{ github.event.inputs.rtefrance_ortools_branch || 'main' }} + echo "OR_REPO=$OR_REPO" >> $GITHUB_ENV + echo "OR_REF=$OR_REF" >> $GITHUB_ENV - name: Checkout or-tools - if: ${{ env.RELEASE_CREATED == 'true' }} uses: actions/checkout@v4 with: - repository: google/or-tools - ref: 'stable' + repository: ${{ env.OR_REPO }} + ref: ${{ env.OR_REF }} - name: Checkout this repository uses: actions/checkout@v4