Skip to content

Commit

Permalink
more concise
Browse files Browse the repository at this point in the history
  • Loading branch information
sgatto committed Jan 9, 2024
1 parent dcf2a4c commit 07ed37d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
-DBUILD_PYTHON=${{ matrix.python }} \
-DBUILD_JAVA=${{ matrix.java }} \
-DBUILD_DOTNET=${{ matrix.dotnet }} \
-DBUILD_EXAMPLES=ON \
-DBUILD_EXAMPLES=${{ env.RELEASE_CREATED && 'OFF' || 'ON' }} \
-DBUILD_DEPS=ON \
-DUSE_SIRIUS=${{ matrix.sirius }} \
-Dsirius_solver_DIR="${{ env.SIRIUS_CMAKE_DIR }}" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
-DBUILD_PYTHON=${{ matrix.cmake.python }} \
-DBUILD_JAVA=${{ matrix.cmake.java }} \
-DBUILD_DOTNET=${{ matrix.cmake.dotnet }} \
-DBUILD_EXAMPLES=ON \
-DBUILD_EXAMPLES=${{ env.RELEASE_CREATED && 'OFF' || 'ON' }} \
-DBUILD_DEPS=ON \
-DUSE_SIRIUS=${{ matrix.sirius }} \
-Dsirius_solver_DIR="${{ env.SIRIUS_CMAKE_DIR }}" \
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
SIRIUS_RELEASE_TAG: ${{ matrix.sirius-release-tag }}
SIRIUS_INSTALL_DIR: ${{ github.workspace }}/sirius_install
SIRIUS: ${{ github.workspace }}/sirius_install/bin
RELEASE_CREATED: ${{ github.event_name == 'release' && github.event.action == 'created' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -103,7 +104,7 @@ jobs:
-DBUILD_PYTHON=${{ matrix.cmake.python }}
-DBUILD_JAVA=${{ matrix.cmake.java }}
-DBUILD_DOTNET=${{ matrix.cmake.dotnet }}
-DBUILD_EXAMPLES=ON
-DBUILD_EXAMPLES=${{ env.RELEASE_CREATED && 'OFF' || 'ON' }}
-DBUILD_DEPS=ON
-DUSE_SIRIUS=${{ matrix.sirius }}
-Dsirius_solver_DIR="${{ env.SIRIUS_CMAKE_DIR }}"
Expand Down Expand Up @@ -158,12 +159,6 @@ jobs:
APPENDIX_WITH_SHARED="${OS}${WITH_SHARED}${WITH_SIRIUS}"
echo "appendix_with_shared=$APPENDIX_WITH_SHARED" >> $GITHUB_OUTPUT
- name: is release created
shell: bash
run: |
release_created=${{ github.event_name == 'release' && github.event.action == 'created' }}
echo "RELEASE_CREATED=$release_created" >> $GITHUB_ENV
- name: Get release
if: ${{ env.RELEASE_CREATED == 'true' }}
id: get_release
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/windows-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

env:
GITHUB_TOKEN: ${{ github.token }}
RELEASE_CREATED: ${{ github.event_name == 'release' && github.event.action == 'created' }}

jobs:
build:
Expand All @@ -31,12 +32,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: is release created
shell: bash
run: |
release_created=${{ github.event_name == 'release' && github.event.action == 'created' }}
echo "RELEASE_CREATED=$release_created" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -65,22 +60,15 @@ jobs:
mv "${{ matrix.os }}_sirius-solver-install" "${{ env.SIRIUS_INSTALL_PATH }}"
echo "${{ env.SIRIUS }}" >> $GITHUB_PATH
- name: examples on off
id: examples
shell: bash
run: |
[ ${{ env.RELEASE_CREATED }} == "true" ] && WITH_EXAMPLES="OFF" || WITH_EXAMPLES="ON"
echo "on=$WITH_EXAMPLES" >> $GITHUB_OUTPUT
- name: Check cmake
run: cmake --version
- name: Configure
run: >
cmake -S. -Bbuild
-DCMAKE_BUILD_TYPE=Release
-DBUILD_DEPS=ON
-DBUILD_EXAMPLES=${{ env.RELEASE_CREATED && 'OFF' || 'ON' }}
-DBUILD_SAMPLES=OFF
-DBUILD_EXAMPLES=${{ steps.examples.outputs.on }}
-DCMAKE_INSTALL_PREFIX="install"
-DBUILD_FLATZINC=OFF
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/windows-java-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

env:
GITHUB_TOKEN: ${{ github.token }}
RELEASE_CREATED: ${{ github.event_name == 'release' && github.event.action == 'created' }}

jobs:
build:
Expand All @@ -27,11 +28,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: is release created
shell: bash
run: |
release_created=${{ github.event_name == 'release' && github.event.action == 'created' }}
echo "RELEASE_CREATED=$release_created" >> $GITHUB_ENV
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v3
with:
Expand Down Expand Up @@ -60,13 +56,6 @@ jobs:
echo "XPAUTH_PATH=$XPRESS_DIR\license\community-xpauth.xpr" >> $GITHUB_ENV
echo "$XPRESS_DIR/bin" >> $GITHUB_PATH
- name: examples on off
id: examples
shell: bash
run: |
[ ${{ env.RELEASE_CREATED }} == "true" ] && WITH_EXAMPLES="OFF" || WITH_EXAMPLES="ON"
echo "on=$WITH_EXAMPLES" >> $GITHUB_OUTPUT
- name: Check cmake
run: cmake --version
- name: Configure
Expand All @@ -75,7 +64,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release
-DBUILD_JAVA=ON
-DBUILD_DOTNET=ON
-DBUILD_EXAMPLES=${{ steps.examples.outputs.on }}
-DBUILD_EXAMPLES=${{ env.RELEASE_CREATED && 'OFF' || 'ON' }}
-DBUILD_CXX_SAMPLES=OFF
-DBUILD_SAMPLES=OFF
-DCMAKE_INSTALL_PREFIX="install"
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/windows-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

env:
GITHUB_TOKEN: ${{ github.token }}
RELEASE_CREATED: ${{ github.event_name == 'release' && github.event.action == 'created' }}

jobs:
build:
Expand All @@ -34,12 +35,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: is release created
shell: bash
run: |
release_created=${{ github.event_name == 'release' && github.event.action == 'created' }}
echo "RELEASE_CREATED=$release_created" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -70,13 +65,6 @@ jobs:
echo "XPAUTH_PATH=$XPRESS_DIR\license\community-xpauth.xpr" >> $GITHUB_ENV
echo "$XPRESS_DIR/bin" >> $GITHUB_PATH
- name: examples on off
id: examples
shell: bash
run: |
[ ${{ env.RELEASE_CREATED }} == "true" ] && WITH_EXAMPLES="OFF" || WITH_EXAMPLES="ON"
echo "on=$WITH_EXAMPLES" >> $GITHUB_OUTPUT
- name: Check cmake
run: cmake --version
- name: Configure
Expand All @@ -85,7 +73,7 @@ jobs:
-G "Visual Studio 17 2022"
-DCMAKE_BUILD_TYPE=Release
-DBUILD_SAMPLES=OFF
-DBUILD_EXAMPLES=${{ steps.examples.outputs.on }}
-DBUILD_EXAMPLES=${{ env.RELEASE_CREATED && 'OFF' || 'ON' }}
-DBUILD_CXX_SAMPLES=OFF
-DBUILD_PYTHON=ON
-DBUILD_SAMPLES=OFF
Expand Down

0 comments on commit 07ed37d

Please sign in to comment.