From ba3c9e88662c7219b625388d73e4fe8e15581961 Mon Sep 17 00:00:00 2001 From: Miranda Mundt Date: Fri, 15 Nov 2024 12:11:44 -0700 Subject: [PATCH] Add in logic in a git command --- .github/workflows/release_wheel_creation.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_wheel_creation.yml b/.github/workflows/release_wheel_creation.yml index 0b728593549..34d1c27ba98 100644 --- a/.github/workflows/release_wheel_creation.yml +++ b/.github/workflows/release_wheel_creation.yml @@ -56,6 +56,16 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Create pyproject.toml + run: | + if [[ ${{ matrix.os }} == *"ubuntu"* ]]; then + echo -e '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE/pyproject.toml + elif [[ ${{ matrix.os }} == *"macos"* ]]; then + echo '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE/pyproject.toml + else + echo '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE\pyproject.toml + fi + ls -la $GITHUB_WORKSPACE - name: Build wheels uses: pypa/cibuildwheel@v2.21.3 with: @@ -67,8 +77,6 @@ jobs: CIBW_BUILD: ${{ matrix.wheel-version }} CIBW_SKIP: "*-musllinux*" CIBW_BUILD_VERBOSITY: 2 - CIBW_BEFORE_ALL_LINUX: echo -e '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE/pyproject.toml && ls $GITHUB_WORKSPACE - CIBW_BEFORE_ALL_MACOS: echo '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE/pyproject.toml && cat $GITHUB_WORKSPACE/pyproject.toml CIBW_ENVIRONMENT: PYOMO_SETUP_ARGS="${{ matrix.GLOBAL_OPTIONS }}" - uses: actions/upload-artifact@v4 with: @@ -114,6 +122,7 @@ jobs: - name: Create pyproject.toml run: | echo -e '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE/pyproject.toml + ls -la $GITHUB_WORKSPACE - name: Build wheels uses: pypa/cibuildwheel@v2.21.3 with: