Skip to content

Add initial pass of pre-kickstart challenge worlds #71

Add initial pass of pre-kickstart challenge worlds

Add initial pass of pre-kickstart challenge worlds #71

Workflow file for this run

name: Lint & generate release zip
on:
push:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
py_version: ["3.8", "3.9", "3.10", "3.11"]
include:
- os: windows-latest
py_version: "3.8"
- os: windows-latest
py_version: "3.11"
- os: macos-latest
py_version: "3.8"
- os: macos-latest
py_version: "3.11"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r dev_requirements.txt
- name: Download & install Webots (Linux)
if: runner.os == 'Linux'
run: |
wget -O ./webots.deb \
https://github.com/cyberbotics/webots/releases/download/R2023b/webots_2023b_amd64.deb
sudo apt-get install --yes ./webots.deb
- name: Download & extract Webots (Windows)
# Windows install was problematic so we just extract the python library for typehints
if: runner.os == 'Windows'
shell: bash
run: |
mkdir stubs
C:\\msys64\\usr\\bin\\wget.exe -O ./webots.tar.bz2 \
https://github.com/cyberbotics/webots/releases/download/R2023b/webots-R2023b-x86-64.tar.bz2
C:\\msys64\\usr\\bin\\tar.exe xvf webots.tar.bz2 --strip-components=4 \
--directory=stubs webots/lib/controller/python/controller
- name: Download & install Webots (macOS)
if: runner.os == 'macOS'
run: |
wget -O ./webots.dmg \
https://github.com/cyberbotics/webots/releases/download/R2023b/webots-R2023b.dmg
hdiutil mount ./webots.dmg
sudo cp -R /Volumes/Webots/Webots.app /Applications
hdiutil unmount /Volumes/Webots
- name: Lint
run: |
poe lint
- name: Typecheck
run: |
poe type
# - name: Run tests
# run: |
# poe test
# - name: Run Webots tests
# if: runner.os != 'Windows'
# run: |
# poe webots-test
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install release dependencies
run: |
# pandoc is required for README.rst -> README.md conversion
sudo apt-get update
wget https://github.com/jgm/pandoc/releases/download/3.3/pandoc-3.3-1-amd64.deb
sudo apt-get install ./pandoc-3.3-1-amd64.deb
python -m pip install --upgrade pip
python -m pip install -r dev_requirements.txt
- name: Make release
id: release
run: |
poe release
# Log the release name for later use
echo "RELEASE_NAME=$(ls dist/)"| sed 's/\.zip//' > "$GITHUB_OUTPUT"
# Extract the release the release to avoid the double zip
unzip dist/*.zip -d dist/
rm dist/sbot-simulator*.zip
- name: Save built release
uses: actions/upload-artifact@v4
with:
name: ${{ steps.release.outputs.RELEASE_NAME }}
path: |
dist/*