Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcCote committed Jan 20, 2025
1 parent a824664 commit 93f51d5
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 31 deletions.
51 changes: 28 additions & 23 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,29 @@ jobs:
manylinux_image: manylinux2014

# MacOS x86_64
- os: macos-12
- os: macos-13
python: 39
platform_id: macosx_x86_64
- os: macos-12
python: 310
platform_id: macosx_x86_64
- os: macos-12
python: 311
platform_id: macosx_x86_64
- os: macos-12
# - os: macos-13
# python: 310
# platform_id: macosx_x86_64
# - os: macos-13
# python: 311
# platform_id: macosx_x86_64
- os: macos-13
python: 312
platform_id: macosx_x86_64

# MacOS arm64
- os: macos-14
python: 39
platform_id: macosx_arm64
- os: macos-14
python: 310
platform_id: macosx_arm64
- os: macos-14
python: 311
platform_id: macosx_arm64
# - os: macos-14
# python: 310
# platform_id: macosx_arm64
# - os: macos-14
# python: 311
# platform_id: macosx_arm64
- os: macos-14
python: 312
platform_id: macosx_arm64
Expand All @@ -68,13 +68,6 @@ jobs:
with:
python-version: "3.12"

- name: Install dependencies on macos
if: startsWith(matrix.os, 'macos')
run: |
brew install glkclient
brew install glkview
brew install zoomview
- name: Install cibuildwheel
run: python -m pip install cibuildwheel

Expand Down Expand Up @@ -140,11 +133,14 @@ jobs:
merge-multiple: true
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true

test:
needs: release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: ['3.9', '3.10', '3.11', '3.12']
Expand All @@ -154,15 +150,24 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies

- name: Install dependencies (Linux)
run: sudo apt update && sudo apt install -y --no-install-recommends graphviz
if: startsWith(matrix.os, 'ubuntu')

- name: Install dependencies (MacOS)
run: brew install graphviz
if: startsWith(matrix.os, 'macos')

- name: Install TextWorld
run: |
python -m pip install --upgrade pip
pip install pytest pytest-azurepipelines pytest-cov
pip install --pre textworld[full]
- name: Run tests
run: |
pytest --durations=10 --junitxml=junit/test-results.xml --cov=textworld --cov-report=xml --cov-report=html tests/ textworld/
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: test-results
path: junit/test-results.xml
41 changes: 41 additions & 0 deletions .github/workflows/test_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Test from PyPi"

# Trigger the create release workflow
on:
workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install dependencies (Linux)
run: sudo apt update && sudo apt install -y --no-install-recommends graphviz
if: startsWith(matrix.os, 'ubuntu')

- name: Install dependencies (MacOS)
run: brew install graphviz
if: startsWith(matrix.os, 'macos')

- name: Install TextWorld
run: |
python -m pip install --upgrade pip
pip install pytest pytest-azurepipelines pytest-cov
pip install --pre textworld[full]
- name: Run tests
run: |
pytest --durations=10 --junitxml=junit/test-results.xml --cov=textworld --cov-report=xml --cov-report=html tests/ textworld/
- uses: actions/upload-artifact@v4
with:
name: test-results
path: junit/test-results.xml
5 changes: 2 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ recursive-include textworld/render/tmpl *
recursive-include textworld/thirdparty/glulx *

recursive-include textworld/thirdparty/inform7 *
recursive-include textworld/thirdparty/inform7-6M62/bin *
recursive-include textworld/thirdparty/inform7-6M62/share/inform7/Compilers *
include textworld/thirdparty/inform7-6M62/share/inform7/Compilers/inform6
include textworld/thirdparty/inform7-6M62/share/inform7/Compilers/ni
recursive-include textworld/thirdparty/inform7-6M62/share/inform7/Internal *
recursive-include textworld/thirdparty/inform7-6M62/share/inform7/Interpreters *

global-exclude *.o *.a
global-exclude */__pycache__/*
Expand Down
8 changes: 4 additions & 4 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ if [ "${machine}" == 'Mac' ] && [ -e inform7-6M62 ]; then
current_dir="$(pwd)"
cd /Volumes/Inform/Inform.app/Contents/MacOS
mkdir -p "$current_dir/inform7-6M62/share/inform7/Compilers/"
mkdir -p "$current_dir/inform7-6M62/share/inform7/Interpreters/"
cp cBlorb inform6 Inform intest ni "$current_dir/inform7-6M62/share/inform7/Compilers/"
cp ./git* "$current_dir/inform7-6M62/share/inform7/Interpreters/dumb-git"
cp ./glulxe* "$current_dir/inform7-6M62/share/inform7/Interpreters/dumb-glulxe"
# mkdir -p "$current_dir/inform7-6M62/share/inform7/Interpreters/"
cp inform6 ni "$current_dir/inform7-6M62/share/inform7/Compilers/"
# cp ./git* "$current_dir/inform7-6M62/share/inform7/Interpreters/dumb-git"
# cp ./glulxe* "$current_dir/inform7-6M62/share/inform7/Interpreters/dumb-glulxe"

cd "$current_dir"

Expand Down
2 changes: 1 addition & 1 deletion textworld/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.6.2rc2'
__version__ = '1.6.2rc4'

0 comments on commit 93f51d5

Please sign in to comment.