-
Notifications
You must be signed in to change notification settings - Fork 2
107 lines (104 loc) · 3.31 KB
/
check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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
sudo apt-get install -y pandoc
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
RELEASE_NAME="$(ls dist/)" echo "${RELEASE_NAME##*.}"
RELEASE_NAME="$(ls dist/)" echo "${RELEASE_NAME##*.}" >> "$GITHUB_OUTPUT"
# Extract the release the release to avoid the double zip
unzip dist/*.zip -d dist/
rm dist/sbot-simulator*.zip
# TODO unzip release to avoid the double zip, but
- name: Save built release
uses: actions/upload-artifact@v4
with:
name: ${{ steps.release.outputs.RELEASE_NAME }}
path: |
dist/*