From b1e1e86e4545f12e180fd1e9d5f9681b87a89363 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 16:11:42 -0400 Subject: [PATCH 01/27] Auto build script --- .github/workflows/wheels.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/wheels.yml diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 00000000..65dd6fbd --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,35 @@ +name: Build + +on: [push, pull_request] + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-13, macos-14] + # python: [3.7, 3.8, 3.9, 3.10] + python: [3.7] + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + # Used to host cibuildwheel + - uses: actions/setup-python@v5 + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel==2.19.0 + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + # to supply options, put them in 'env', like: + # env: + # CIBW_SOME_OPTION: value + + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl \ No newline at end of file From d341340fba617ca12da1954986a602bea1ed85d8 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 16:20:49 -0400 Subject: [PATCH 02/27] Update workflows --- .github/workflows/test.yml | 2 +- .github/workflows/wheels.yml | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index deb79e21..068711e8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,6 @@ name: Testing -on: [push, pull_request] +on: [push] permissions: contents: read diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 65dd6fbd..ddea7754 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,6 +1,6 @@ name: Build -on: [push, pull_request] +on: [push] jobs: build_wheels: @@ -23,12 +23,23 @@ jobs: - name: Install cibuildwheel run: python -m pip install cibuildwheel==2.19.0 + # Install Linux dependencies + - name: Update deb repository + if: runner.os == 'Linux' + run: sudo apt-get update + + - name: Install deb dependencies + if: runner.os == 'Linux' + run: sudo apt-get install -y xorg-dev libglu1-mesa-dev libglew-dev xvfb + + # Build wheels - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse # to supply options, put them in 'env', like: # env: # CIBW_SOME_OPTION: value + # Upload wheels - uses: actions/upload-artifact@v4 with: name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} From 4e2914e4071eb749300c7797f26cdb83fbfd841c Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 16:37:33 -0400 Subject: [PATCH 03/27] Update scripts --- .github/workflows/test.yml | 46 ------------------------------------ .github/workflows/wheels.yml | 26 ++++++++++++++++---- 2 files changed, 22 insertions(+), 50 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 068711e8..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Testing - -on: [push] - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - strategy: - matrix: - os: - - "ubuntu-22.04" - - "ubuntu-latest" - python: - - "3.7" - - "3.8" - - "3.9" - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - name: Update deb repository - run: sudo apt-get update - - name: Install deb dependencies - run: sudo apt-get install -y xorg-dev libglu1-mesa-dev libglew-dev xvfb - - name: Install python dependencies - run: pip install -r requirements-dev.txt - - name: Cache python wheel packages - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: wheel-cache-${{ hashFiles('requirements-dev.txt') }} - - name: Install evolution gym - run: pip install -e . - - name: Run test - run: xvfb-run python -m pytest -s -v -n auto -m lite diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index ddea7754..11e00f9f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -7,10 +7,28 @@ jobs: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-13, macos-14] + include: + - os: windows-latest + python: 3.7 + platform_id: win_amd64 + + - os: ubuntu-latest + python: 3.7 + platform_id: manylinux_x86_64 + + - os: macos-12 + python: 3.7 + platform_id: macosx_x86_64 + + - os: macos-14 + python: 3.7 + platform_id: macosx_arm64 + # os: [ubuntu-latest, windows-latest, macos-13, macos-14] + # os: [ubuntu-latest, windows-latest, macos-13, macos-14] # python: [3.7, 3.8, 3.9, 3.10] - python: [3.7] + # python: [3.7] steps: - uses: actions/checkout@v4 @@ -25,11 +43,11 @@ jobs: # Install Linux dependencies - name: Update deb repository - if: runner.os == 'Linux' + if: ${{ matrix.platform_id == 'manylinux_x86_64' }} run: sudo apt-get update - name: Install deb dependencies - if: runner.os == 'Linux' + if: ${{ matrix.platform_id == 'manylinux_x86_64' }} run: sudo apt-get install -y xorg-dev libglu1-mesa-dev libglew-dev xvfb # Build wheels From 42f836b0a3f0a63d89ef0a72785a2f0ef9fce89e Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 17:00:53 -0400 Subject: [PATCH 04/27] Update scripts --- .github/workflows/wheels.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 11e00f9f..cd3b9b7b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -48,7 +48,7 @@ jobs: - name: Install deb dependencies if: ${{ matrix.platform_id == 'manylinux_x86_64' }} - run: sudo apt-get install -y xorg-dev libglu1-mesa-dev libglew-dev xvfb + run: sudo apt-get install -y xorg-dev libglu1-mesa-dev libglew-dev xvfb xrandr-dev # Build wheels - name: Build wheels diff --git a/pyproject.toml b/pyproject.toml index b453189b..5be2fcbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ description = "Evolution Gym: A benchmark for developing and evaluating soft rob readme = "README.md" license = {file = "LICENSE"} keywords = ["evolution", "gym", "evolution gym", "soft robotics", "benchmark", "co-design"] -requires-python = ">=3.7" +requires-python = ">=3.7, <=3.10" classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", From 15af0bc2b9b47c83eb193d4c8d4ec64bd67b80a7 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 17:17:57 -0400 Subject: [PATCH 05/27] Update scripts --- .github/workflows/wheels.yml | 12 +++++++----- pyproject.toml | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index cd3b9b7b..43b90b59 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -10,21 +10,23 @@ jobs: fail-fast: false matrix: include: + # Window 64 bit - os: windows-latest - python: 3.7 platform_id: win_amd64 + # Linux 64 bit manylinux2014 - os: ubuntu-latest - python: 3.7 platform_id: manylinux_x86_64 + manylinux_image: manylinux2014 + # MacOS x86_64 - os: macos-12 - python: 3.7 platform_id: macosx_x86_64 - + + # MacOS arm64 - os: macos-14 - python: 3.7 platform_id: macosx_arm64 + # os: [ubuntu-latest, windows-latest, macos-13, macos-14] # os: [ubuntu-latest, windows-latest, macos-13, macos-14] # python: [3.7, 3.8, 3.9, 3.10] diff --git a/pyproject.toml b/pyproject.toml index 5be2fcbe..c3158459 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,10 @@ evogym = "evogym" [tool.setuptools.package-data] "evogym.envs" = ["sim_files/*.json"] +[tool.cibuildwheel] +# Skip 32-bit builds +skip = ["*-win32", "*-manylinux_i686"] + [project] name = "evogym" version = "2.0.0" From b2540dcf6fa3f97e0e5b3434d099271486383c98 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 17:31:47 -0400 Subject: [PATCH 06/27] Update script --- .github/workflows/wheels.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 43b90b59..2c5c5c5c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -39,6 +39,8 @@ jobs: # Used to host cibuildwheel - uses: actions/setup-python@v5 + with: + python-version: "3.8" - name: Install cibuildwheel run: python -m pip install cibuildwheel==2.19.0 From 1aeab04786eba8944a46dc7048aaa7e9c01b0ec7 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 17:39:15 -0400 Subject: [PATCH 07/27] update scripts --- .github/workflows/wheels.yml | 12 ++++++------ pyproject.toml | 8 ++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2c5c5c5c..854fde29 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -46,13 +46,13 @@ jobs: run: python -m pip install cibuildwheel==2.19.0 # Install Linux dependencies - - name: Update deb repository - if: ${{ matrix.platform_id == 'manylinux_x86_64' }} - run: sudo apt-get update + # - name: Update deb repository + # if: ${{ matrix.platform_id == 'manylinux_x86_64' }} + # run: sudo apt-get update - - name: Install deb dependencies - if: ${{ matrix.platform_id == 'manylinux_x86_64' }} - run: sudo apt-get install -y xorg-dev libglu1-mesa-dev libglew-dev xvfb xrandr-dev + # - name: Install deb dependencies + # if: ${{ matrix.platform_id == 'manylinux_x86_64' }} + # run: sudo apt-get install -y xorg-dev libglu1-mesa-dev libglew-dev xvfb xrandr-dev # Build wheels - name: Build wheels diff --git a/pyproject.toml b/pyproject.toml index c3158459..de273b26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,14 @@ evogym = "evogym" # Skip 32-bit builds skip = ["*-win32", "*-manylinux_i686"] +[tool.cibuildwheel.linux] +before-all = "yum install xorg-dev libglu1-mesa-dev libglew-dev xvfb" +test-command = "echo 'installed'" + +[[tool.cibuildwheel.overrides]] +select = "*-musllinux*" +before-all = "apk add xorg-dev libglu1-mesa-dev libglew-dev xvfb" + [project] name = "evogym" version = "2.0.0" From 69bcc959e5884d2b51ca9646729ac61ca4590af0 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 18:51:33 -0400 Subject: [PATCH 08/27] Update scripts --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index de273b26..f141b1b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,8 @@ evogym = "evogym" skip = ["*-win32", "*-manylinux_i686"] [tool.cibuildwheel.linux] -before-all = "yum install xorg-dev libglu1-mesa-dev libglew-dev xvfb" +before-all = "apk add xorg-dev libglu1-mesa-dev libglew-dev xvfb" +# before-all = "yum install xorg-dev libglu1-mesa-dev libglew-dev xvfb" test-command = "echo 'installed'" [[tool.cibuildwheel.overrides]] From 60caa7a9fbce7533200ae2848b4e28c55090dc9b Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 19:00:45 -0400 Subject: [PATCH 09/27] Update scripts --- .github/workflows/wheels.yml | 6 +++--- pyproject.toml | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 854fde29..6b8960a6 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -7,7 +7,7 @@ jobs: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: - fail-fast: false + # fail-fast: false matrix: include: # Window 64 bit @@ -16,8 +16,8 @@ jobs: # Linux 64 bit manylinux2014 - os: ubuntu-latest - platform_id: manylinux_x86_64 - manylinux_image: manylinux2014 + # platform_id: manylinux_x86_64 + # manylinux_image: manylinux2014 # MacOS x86_64 - os: macos-12 diff --git a/pyproject.toml b/pyproject.toml index f141b1b8..de273b26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,8 +17,7 @@ evogym = "evogym" skip = ["*-win32", "*-manylinux_i686"] [tool.cibuildwheel.linux] -before-all = "apk add xorg-dev libglu1-mesa-dev libglew-dev xvfb" -# before-all = "yum install xorg-dev libglu1-mesa-dev libglew-dev xvfb" +before-all = "yum install xorg-dev libglu1-mesa-dev libglew-dev xvfb" test-command = "echo 'installed'" [[tool.cibuildwheel.overrides]] From 201b14b816efd38f7f0baa1f71f90e4892b865a1 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 19:08:38 -0400 Subject: [PATCH 10/27] Update scripts --- .github/workflows/wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 6b8960a6..366c84a1 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -16,8 +16,8 @@ jobs: # Linux 64 bit manylinux2014 - os: ubuntu-latest - # platform_id: manylinux_x86_64 - # manylinux_image: manylinux2014 + platform_id: manylinux_x86_64 + manylinux_image: manylinux_2_24 # MacOS x86_64 - os: macos-12 From 2a843b88147fcbe9ebf0bc67c322bd074140d24c Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 19:13:15 -0400 Subject: [PATCH 11/27] Update scripts --- .github/workflows/wheels.yml | 4 ++-- pyproject.toml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 366c84a1..6cab36eb 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -14,10 +14,10 @@ jobs: - os: windows-latest platform_id: win_amd64 - # Linux 64 bit manylinux2014 + # Linux 64 bit - os: ubuntu-latest platform_id: manylinux_x86_64 - manylinux_image: manylinux_2_24 + # manylinux_image: manylinux_2_24 # MacOS x86_64 - os: macos-12 diff --git a/pyproject.toml b/pyproject.toml index de273b26..0a784706 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,7 @@ evogym = "evogym" skip = ["*-win32", "*-manylinux_i686"] [tool.cibuildwheel.linux] +manylinux-x86_64-image = "dockcross/manylinux-x64" before-all = "yum install xorg-dev libglu1-mesa-dev libglew-dev xvfb" test-command = "echo 'installed'" From 09b89ab37b3ffe0aadaceedd9d8039648a102b3e Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 19:16:25 -0400 Subject: [PATCH 12/27] Update scripts --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0a784706..72cb8404 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,8 @@ evogym = "evogym" skip = ["*-win32", "*-manylinux_i686"] [tool.cibuildwheel.linux] -manylinux-x86_64-image = "dockcross/manylinux-x64" +manylinux-x86_64-image = "quay.io/pypa/manylinux2010_x86_64:latest" +manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux2010_x86_64:latest" before-all = "yum install xorg-dev libglu1-mesa-dev libglew-dev xvfb" test-command = "echo 'installed'" From 1d14e20305b349bebaca18935ec17cd80c282024 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 19:17:51 -0400 Subject: [PATCH 13/27] Update scripts --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 72cb8404..6f0e5546 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,8 +17,8 @@ evogym = "evogym" skip = ["*-win32", "*-manylinux_i686"] [tool.cibuildwheel.linux] -manylinux-x86_64-image = "quay.io/pypa/manylinux2010_x86_64:latest" -manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux2010_x86_64:latest" +manylinux-x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" +manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" before-all = "yum install xorg-dev libglu1-mesa-dev libglew-dev xvfb" test-command = "echo 'installed'" From 539d4f0526a6081bed93a92ae18dd9711f5fc4ba Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 23:04:11 -0400 Subject: [PATCH 14/27] Update scripts --- .github/workflows/wheels.yml | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 6cab36eb..9fdc006c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -15,8 +15,8 @@ jobs: platform_id: win_amd64 # Linux 64 bit - - os: ubuntu-latest - platform_id: manylinux_x86_64 + # - os: ubuntu-latest + # platform_id: manylinux_x86_64 # manylinux_image: manylinux_2_24 # MacOS x86_64 diff --git a/pyproject.toml b/pyproject.toml index 6f0e5546..253b3488 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ description = "Evolution Gym: A benchmark for developing and evaluating soft rob readme = "README.md" license = {file = "LICENSE"} keywords = ["evolution", "gym", "evolution gym", "soft robotics", "benchmark", "co-design"] -requires-python = ">=3.7, <=3.10" +requires-python = ">=3.7, <=3.11" classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", From 088e3d0c2628af3ae0ae979e07867aab8065eac5 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Sat, 15 Jun 2024 23:04:33 -0400 Subject: [PATCH 15/27] Update scripts --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 9fdc006c..c3a3e1ff 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -7,7 +7,7 @@ jobs: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: - # fail-fast: false + fail-fast: false matrix: include: # Window 64 bit From 65f8d8895a6ab7530a20e4b9e5b4a1abddc2cbf4 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 12:58:16 -0400 Subject: [PATCH 16/27] Install correct linux packages --- .github/workflows/wheels.yml | 5 +++-- pyproject.toml | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index c3a3e1ff..0ba21486 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -15,8 +15,9 @@ jobs: platform_id: win_amd64 # Linux 64 bit - # - os: ubuntu-latest - # platform_id: manylinux_x86_64 + - os: ubuntu-latest + platform_id: manylinux_x86_64 + manylinux_image: manylinux2014 # manylinux_image: manylinux_2_24 # MacOS x86_64 diff --git a/pyproject.toml b/pyproject.toml index 253b3488..a10bd54a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,9 +17,9 @@ evogym = "evogym" skip = ["*-win32", "*-manylinux_i686"] [tool.cibuildwheel.linux] -manylinux-x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" -manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" -before-all = "yum install xorg-dev libglu1-mesa-dev libglew-dev xvfb" +# manylinux-x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" +# manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" +before-all = "yum install libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel mesa-libGLU-devel" test-command = "echo 'installed'" [[tool.cibuildwheel.overrides]] From a7c44c91a88cbafc1b442e5d5e884f026e96a0b9 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 13:09:40 -0400 Subject: [PATCH 17/27] Add -y --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a10bd54a..05e2c797 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ skip = ["*-win32", "*-manylinux_i686"] [tool.cibuildwheel.linux] # manylinux-x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" # manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" -before-all = "yum install libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel mesa-libGLU-devel" +before-all = "yum install -y libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel mesa-libGLU-devel" test-command = "echo 'installed'" [[tool.cibuildwheel.overrides]] From 23e9bf387665d8a27f7a58045dcaf2cb4bd069e8 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 14:36:53 -0400 Subject: [PATCH 18/27] Change linux image --- .github/workflows/wheels.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 0ba21486..559fe782 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -17,8 +17,11 @@ jobs: # Linux 64 bit - os: ubuntu-latest platform_id: manylinux_x86_64 - manylinux_image: manylinux2014 - # manylinux_image: manylinux_2_24 + manylinux_image: manylinux_2_28 + + # Many linux 2014 dosen't work due to an issue in GLEW: + # https://github.com/glfw/glfw/issues/2139 + # manylinux_image: manylinux2014 # MacOS x86_64 - os: macos-12 From 7b58c2b0da6e7fb6e7e36e4c842d0b32daccdd29 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 14:40:43 -0400 Subject: [PATCH 19/27] Change linux image --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 05e2c797..ec596867 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,9 @@ evogym = "evogym" skip = ["*-win32", "*-manylinux_i686"] [tool.cibuildwheel.linux] + +manylinux-x86_64-image = "manylinux_2_28" +# manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" # manylinux-x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" # manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" before-all = "yum install -y libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel mesa-libGLU-devel" From 5355cbbfa6d6804fc9f2b9f0f5b6ac0565c044f3 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 14:42:27 -0400 Subject: [PATCH 20/27] Change linux image for pypy as well --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index ec596867..348bb0ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ skip = ["*-win32", "*-manylinux_i686"] [tool.cibuildwheel.linux] manylinux-x86_64-image = "manylinux_2_28" +manylinux-pypy_x86_64-image = "manylinux_2_28" # manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" # manylinux-x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" # manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" From 5c2d5c52b64d0caecee38a2ead7a8c999c3b5aef Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 14:44:30 -0400 Subject: [PATCH 21/27] Cleanup --- pyproject.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 348bb0ad..d1ad42f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,15 +20,12 @@ skip = ["*-win32", "*-manylinux_i686"] manylinux-x86_64-image = "manylinux_2_28" manylinux-pypy_x86_64-image = "manylinux_2_28" -# manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" -# manylinux-x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" -# manylinux-pypy_x86_64-image = "quay.io/pypa/manylinux_1_2_x86_64:latest" before-all = "yum install -y libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel mesa-libGLU-devel" test-command = "echo 'installed'" [[tool.cibuildwheel.overrides]] select = "*-musllinux*" -before-all = "apk add xorg-dev libglu1-mesa-dev libglew-dev xvfb" +before-all = "apk add xorg-dev libglu1-mesa-dev libglew-dev xvfb" # these package names may be wrong, untested [project] name = "evogym" From 2f4ff7936d688d26b71c5dcc3bfe65ada884f3db Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 15:28:40 -0400 Subject: [PATCH 22/27] Skip musllinux, test python versions --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d1ad42f9..1d2087ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,8 +13,8 @@ evogym = "evogym" "evogym.envs" = ["sim_files/*.json"] [tool.cibuildwheel] -# Skip 32-bit builds -skip = ["*-win32", "*-manylinux_i686"] +# Skip 32-bit builds, and musllinux builds +skip = ["*-win32", "*-manylinux_i686", "*-musllinux*"] [tool.cibuildwheel.linux] @@ -37,7 +37,7 @@ description = "Evolution Gym: A benchmark for developing and evaluating soft rob readme = "README.md" license = {file = "LICENSE"} keywords = ["evolution", "gym", "evolution gym", "soft robotics", "benchmark", "co-design"] -requires-python = ">=3.7, <=3.11" +requires-python = ">=3.7, <3.11" classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", From 501cf34ab0278afc332694e27dff82477d3106b0 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 15:54:42 -0400 Subject: [PATCH 23/27] Add back test suite --- .github/workflows/test.yml | 47 ++++++++++++++++++++++++++++++++++++++ README.md | 4 +++- pytest.ini | 4 ---- tests/pytest.ini | 3 +++ 4 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 pytest.ini create mode 100644 tests/pytest.ini diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..75f28d28 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,47 @@ +name: Test + +on: [push] + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + strategy: + matrix: + os: + - "ubuntu-latest" + python: + - "3.7" + - "3.8" + - "3.9" + - "3.10" + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + - name: Update deb repository + run: sudo apt-get update + - name: Install deb dependencies + run: sudo apt-get install -y xorg-dev libglu1-mesa-dev libglew-dev xvfb + - name: Install python dependencies + run: pip install -r requirements-dev.txt + - name: Cache python wheel packages + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: wheel-cache-${{ hashFiles('requirements-dev.txt') }} + - name: Install evolution gym + run: pip install -e . + - name: Run test + run: xvfb-run pytest -s -v -n auto -m lite + working-directory: tests diff --git a/README.md b/README.md index d904e745..dc114098 100644 --- a/README.md +++ b/README.md @@ -146,9 +146,10 @@ pip install -r requirements-dev.txt ## Run Tests -Run the full test suite: +From within the `tests` directory run the full test suite: ```shell +cd tests pytest -s -v -n auto ``` @@ -156,6 +157,7 @@ Or the lite test suite: ```shell +cd tests pytest -s -v -n auto -m lite ``` diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index d9619212..00000000 --- a/pytest.ini +++ /dev/null @@ -1,4 +0,0 @@ -[pytest] -addopts = --ignore=examples/externals --ignore=evogym/simulator/externals --ignore=examples/gym_test.py -markers = - lite: mark as part of the lite test suite \ No newline at end of file diff --git a/tests/pytest.ini b/tests/pytest.ini new file mode 100644 index 00000000..5da2abb9 --- /dev/null +++ b/tests/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +markers = + lite: mark as part of the lite test suite \ No newline at end of file From a3e748fe3bb6892adb9c0848215fe20743b689c1 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 16:12:31 -0400 Subject: [PATCH 24/27] Update test runner --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 75f28d28..e7925613 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,5 +43,5 @@ jobs: - name: Install evolution gym run: pip install -e . - name: Run test - run: xvfb-run pytest -s -v -n auto -m lite + run: xvfb-run python -m pytest -s -v -n auto -m lite working-directory: tests From dd423cf1589b535f81af5e6d8699473c2d709bee Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 16:17:41 -0400 Subject: [PATCH 25/27] Rename, no fail fast --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e7925613..0c43ce4e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,8 +10,9 @@ concurrency: cancel-in-progress: true jobs: - build: + build_and_test: strategy: + fail-fast: false matrix: os: - "ubuntu-latest" From 846284659e5606b6a08d96445aede2e68a253964 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 17:10:08 -0400 Subject: [PATCH 26/27] Cant build on new numpy version, ignore for now --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1d2087ca..541b310a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ classifiers = [ ] dependencies = [ "gymnasium", - "numpy", + "numpy<2.0.0", ] [project.urls] From cfb62ecc0e31cf6eb647426c5747a24b0f2adad8 Mon Sep 17 00:00:00 2001 From: Jagdeep Bhatia Date: Wed, 19 Jun 2024 17:41:49 -0400 Subject: [PATCH 27/27] Cleanup --- .github/workflows/wheels.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 559fe782..32317813 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -19,7 +19,7 @@ jobs: platform_id: manylinux_x86_64 manylinux_image: manylinux_2_28 - # Many linux 2014 dosen't work due to an issue in GLEW: + # manylinux2014 dosen't work due to an issue in GLEW: # https://github.com/glfw/glfw/issues/2139 # manylinux_image: manylinux2014 @@ -31,11 +31,6 @@ jobs: - os: macos-14 platform_id: macosx_arm64 - # os: [ubuntu-latest, windows-latest, macos-13, macos-14] - # os: [ubuntu-latest, windows-latest, macos-13, macos-14] - # python: [3.7, 3.8, 3.9, 3.10] - # python: [3.7] - steps: - uses: actions/checkout@v4 with: @@ -49,15 +44,6 @@ jobs: - name: Install cibuildwheel run: python -m pip install cibuildwheel==2.19.0 - # Install Linux dependencies - # - name: Update deb repository - # if: ${{ matrix.platform_id == 'manylinux_x86_64' }} - # run: sudo apt-get update - - # - name: Install deb dependencies - # if: ${{ matrix.platform_id == 'manylinux_x86_64' }} - # run: sudo apt-get install -y xorg-dev libglu1-mesa-dev libglew-dev xvfb xrandr-dev - # Build wheels - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse