@@ -88,13 +88,75 @@ jobs:
8888 python -m pip install requests PyGithub
8989 scripts/packaging/publish_release.py --key=${{ secrets.GITHUB_TOKEN }} --repo=${{ github.repository }} --branch=${{ github.ref }} --commit=$(git log -1 --format='%H') --tag=${{ github.ref }}
9090 - uses : actions/upload-artifact@v4
91- if : ${{ contains(github.event.pull_request.labels.*.name, 'test distribution') }}
91+ if : ${{ contains(github.event.pull_request.labels.*.name, 'test suite') || contains(github.event.pull_request.labels.*.name, 'test distribution') }}
9292 with :
9393 name : build-${{ matrix.os }}
9494 path : |
9595 distribution/*.exe
96+ test-suite :
97+ needs : build
98+ if : ${{ contains(github.event.pull_request.labels.*.name, 'test suite') }}
99+ strategy :
100+ matrix :
101+ os : [windows-2019]
102+ runs-on : ${{ matrix.os }}
103+ steps :
104+ - uses : actions/checkout@v3
105+ - name : Download Artifacts
106+ uses : actions/download-artifact@v4
107+ with :
108+ name : build-${{ matrix.os }}
109+ path : artifact
110+ - uses : msys2/setup-msys2@v2
111+ with :
112+ update : false
113+ - name : Install Visual Studio 10 and OpenJDK 18
114+ shell : powershell
115+ run : |
116+ choco install -y openjdk --version=18.0.2
117+ choco install -y visualcpp-build-tools
118+ - name : Install Webots Compilation Dependencies
119+ run : |
120+ export PYTHON_INSTALLATION_FOLDER=/C/hostedtoolcache/windows/Python
121+ export PYTHON_HOME=$PYTHON_INSTALLATION_FOLDER/3.11.`ls $PYTHON_INSTALLATION_FOLDER | grep '^3\.11\.[0-9]\+$' | cut -c6- | sort -n | tail -n1`/x64
122+ echo 'export JAVA_HOME=/C/Program\ Files/OpenJDK/`ls /C/Program\ Files/OpenJDK`' >> ~/.bash_profile
123+ echo 'export PYTHON_HOME='$PYTHON_HOME >> ~/.bash_profile
124+ echo 'export VISUAL_STUDIO_PATH="/C/Program Files (x86)/Microsoft Visual Studio/2017"' >> ~/.bash_profile
125+ echo 'export INNO_SETUP_HOME="/C/Program Files (x86)/Inno Setup 6"' >> ~/.bash_profile
126+ echo 'export PATH=$PYTHON_HOME:$PYTHON_HOME/Scripts:$GITHUB_WORKSPACE/msys64/mingw64/bin:$GITHUB_WORKSPACE/bin/node:/mingw64/bin:/usr/bin:$JAVA_HOME/bin:$PATH' >> ~/.bash_profile
127+ export WEBOTS_HOME=$GITHUB_WORKSPACE
128+ ./scripts/install/msys64_installer.sh --all
129+ - name : Extract Webots
130+ run : |
131+ ./artifact/webots-*.exe //SUPPRESSMSGBOXES //VERYSILENT //NOCANCEL //NORESTART //ALLUSERS
132+ - name : Set up Python 3.11
133+ uses : actions/setup-python@v4
134+ with :
135+ python-version : 3.11
136+ - name : Install Software Renderer
137+ uses : ssciwr/setup-mesa-dist-win@v2
138+ with :
139+ version : ' 24.2.1'
140+ build-type : ' release-mingw'
141+ - name : Test
142+ run : |
143+ export WEBOTS_DISABLE_SAVE_SCREEN_PERSPECTIVE_ON_CLOSE=true
144+ python scripts/packaging/update_urls.py $(git log -1 --format='%H')
145+ export TESTS_HOME=$PWD # required by cache group in the test suite
146+ export WEBOTS_HOME="/c/Program Files/Webots"
147+ export PATH="${WEBOTS_HOME}/msys64/mingw64/bin:$PATH"
148+ export WEBOTS_HOME_PATH=$PWD # required for tests to find Makefile.include
149+ export BRANCH_HASH=$(git log -1 --format='%H')
150+ export MESA_GL_VERSION_OVERRIDE=3.3
151+ export LIBGL_ALWAYS_SOFTWARE=true
152+ python tests/test_suite.py
153+ - name : Setup tmate session
154+ if : ${{ failure() }}
155+ uses : mxschmitt/action-tmate@v3
156+ with :
157+ detached : true
96158 delete-artifacts :
97- needs : [build]
159+ needs : [build, test-suite ]
98160 if : ${{ always() && !contains(github.event.pull_request.labels.*.name, 'test distribution') && !contains(github.event.pull_request.labels.*.name, 'test webots build') }}
99161 strategy :
100162 matrix :
0 commit comments