Update Windows driver INF file according to latest best practices #112
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build for Windows | |
on: [push, pull_request] | |
jobs: | |
build-windows: | |
name: windows ${{ join(matrix.*, ' ') }} | |
env: | |
OPTS: --with-vstudiotarget=${{ matrix.target }} --with-vstudiotargetver=Win10 --prefix=C:/openvswitch/usr --localstatedir=C:/ProgramData/openvswitch/var --sysconfdir=C:/ProgramData/openvswitch/etc --disable-ssl ${{ matrix.opts }} | |
TESTSUITE: ${{ matrix.testsuite }} | |
runs-on: windows-latest | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# run only one job for windows, as more than one be enough currently to verify | |
# PRs | |
# tests are not enabled as they take very long and a lot of them will fail | |
- target: Release | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: install msys | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: base-devel git mingw-w64-ucrt-x86_64-toolchain autotools | |
- name: set up python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
# pypiwin32 has to be installed with a Windows python version therefore | |
# this step will configure python first on Windows and exports | |
# its location for MSYS bash. | |
- name: configure python in Windows cmdline | |
shell: cmd | |
run: | | |
python -m pip install --upgrade pip | |
pip install pypiwin32 | |
echo export pythonLocation="%pythonLocation%" > %RUNNER_TEMP%\msys64\home\%USERNAME%\.pythonenv.sh | |
echo export PYTHONPATH="%pythonLocation%\Lib;%pythonLocation%\DLLs;%pythonLocation%\Lib\lib-tk" >> %RUNNER_TEMP%\msys64\home\%USERNAME%\.pythonenv.sh | |
echo ".pythonenv.sh was generated in %RUNNER_TEMP%\msys64\home\%USERNAME%" | |
- name: generate Visual Studio environment | |
shell: cmd | |
run: | | |
powershell -c ./build-aux/envdiff.ps1 | |
@call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
powershell -c ./build-aux/envdiff.ps1 > %RUNNER_TEMP%\msys64\home\%USERNAME%\.visualstudio.sh | |
echo ".visualstudio.sh was generated in %RUNNER_TEMP%\msys64\home\%USERNAME%" | |
- name: configure python for MSYS | |
run: | | |
source ~/.pythonenv.sh | |
echo "using python from path $pythonLocation" | |
mv /ucrt64/bin/python /ucrt64/bin/python_off | |
mv /ucrt64/bin/python3 /ucrt64/bin/python3_off | |
ln -s "$pythonLocation\python" /ucrt64/bin/python3 | |
- name: prepare | |
run: | | |
[[ -f /usr/bin/link ]] && mv /usr/bin/link /usr/bin/link_off | |
source ~/.visualstudio.sh | |
./.ci/windows-prepare.sh | |
- name: build | |
run: | | |
source ~/.visualstudio.sh | |
source ~/.pythonenv.sh | |
echo $PYTHONPATH | |
./.ci/windows-build.sh | |
- name: upload logs on failure | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: logs-windows-${{ join(matrix.*, '-') }} | |
path: config.log | |
- name: install | |
run: | | |
source ~/.visualstudio.sh | |
source ~/.pythonenv.sh | |
make install | |
cp ./PTHREADS-BUILT/bin/pthreadVC3.dll /C/openvswitch/usr/sbin | |
cp ./PTHREADS-BUILT/bin/pthreadVC3.dll /C/openvswitch/usr/bin | |
mkdir /C/openvswitch/driver | |
cp ./datapath-windows/x64/Win10${{ matrix.target }}/package/* /C/openvswitch/driver | |
cp ./datapath-windows/x64/Win10${{ matrix.target }}/package.cer /C/openvswitch/driver | |
cp ./datapath-windows/misc/* /C/openvswitch/driver | |
cp ./datapath-windows/ovsext/x64/Win10${{ matrix.target }}/DBO_OVSE.pdb /C/openvswitch/driver | |
- name: upload build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: openvswitch-windows-${{ join(matrix.*, '-') }} | |
path: c:\openvswitch |