Skip to content

Commit

Permalink
use repo tag to checkout google-ortools
Browse files Browse the repository at this point in the history
  • Loading branch information
sgatto committed Sep 12, 2024
1 parent eaf7cf5 commit c7db70f
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 22 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/windows-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/windows-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c7db70f

Please sign in to comment.