diff --git a/.github/workflows/centos.yml b/.github/workflows/centos.yml index 8ff24000bb2..85484296042 100644 --- a/.github/workflows/centos.yml +++ b/.github/workflows/centos.yml @@ -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 }}" \ diff --git a/.github/workflows/oracle.yml b/.github/workflows/oracle.yml index 804853cb059..27c76a51ec2 100644 --- a/.github/workflows/oracle.yml +++ b/.github/workflows/oracle.yml @@ -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 }}" \ diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index a3d213054b8..1363a559ba3 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -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: @@ -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 }}" @@ -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 diff --git a/.github/workflows/windows-cpp.yml b/.github/workflows/windows-cpp.yml index 3e58eb4c0df..16022782389 100644 --- a/.github/workflows/windows-cpp.yml +++ b/.github/workflows/windows-cpp.yml @@ -13,6 +13,7 @@ on: env: GITHUB_TOKEN: ${{ github.token }} + RELEASE_CREATED: ${{ github.event_name == 'release' && github.event.action == 'created' }} jobs: build: @@ -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: @@ -65,13 +60,6 @@ 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 @@ -79,8 +67,8 @@ jobs: 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 diff --git a/.github/workflows/windows-java-dotnet.yml b/.github/workflows/windows-java-dotnet.yml index 0c406596501..78df26797a9 100644 --- a/.github/workflows/windows-java-dotnet.yml +++ b/.github/workflows/windows-java-dotnet.yml @@ -13,6 +13,7 @@ on: env: GITHUB_TOKEN: ${{ github.token }} + RELEASE_CREATED: ${{ github.event_name == 'release' && github.event.action == 'created' }} jobs: build: @@ -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: @@ -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 @@ -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" diff --git a/.github/workflows/windows-python.yml b/.github/workflows/windows-python.yml index d40183cd652..66540e55680 100644 --- a/.github/workflows/windows-python.yml +++ b/.github/workflows/windows-python.yml @@ -13,6 +13,7 @@ on: env: GITHUB_TOKEN: ${{ github.token }} + RELEASE_CREATED: ${{ github.event_name == 'release' && github.event.action == 'created' }} jobs: build: @@ -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: @@ -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 @@ -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