From 5dfc442041a11bc8066a143ca3f31362ef72813d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9drik=20Fuoco?= Date: Mon, 26 Aug 2024 12:51:17 -0400 Subject: [PATCH] Windows CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédrik Fuoco --- .github/workflows/ci.yml | 117 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..6ded6b66f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,117 @@ +name: OpenRV + +on: + push: + branches: + - 'feature/**' + paths: + - .github/workflows/ci.yml + + pull_request: + branches: + - 'feature/**' + paths: + - .github/workflows/ci.yml + +jobs: + windows: + runs-on: windows-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup msys2 + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + cache: true + install: >- + mingw-w64-x86_64-autotools + mingw-w64-x86_64-cmake \ + mingw-w64-x86_64-cmake-cmcldeps \ + mingw-w64-x86_64-glew + mingw-w64-x86_64-libarchive + mingw-w64-x86_64-make + mingw-w64-x86_64-meson + mingw-w64-x86_64-toolchain + autoconf + automake + bison + flex + libtool + nasm + p7zip + patch + unzip + zip + + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Display Python installation location + run: | + python -c "import sys; print(sys.executable)" + + # - name: Setup PATH environment variable + # run: | + # echo "PATH=C:/hostedtoolcache/windows/Python/3.10.11/x64:$PATH" >> $GITHUB_ENV + + - run: | + echo "export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/msys64/mingw64/bin:$PATH" >> ~/.bash_profile + shell: msys2 {0} + + - run: | + echo $PATH + ls -al /c/hostedtoolcache/windows/Python/3.10.11/x64 + which python + which python3 + shell: msys2 {0} + + - name: Prepare Qt folder + run: | + mkdir -p /c/qt + shell: msys2 {0} + + - name: Cache Qt installation + uses: actions/cache@v3 + id: qt-cache + with: + path: "c:/" + key: ${{ runner.os }}-qt-${{ hashFiles('~/qt/**') }} + + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: '5.15.2' + host: 'windows' + target: 'desktop' + arch: 'win64_msvc2019_64' + dir: "c:/" + install-deps: 'false' + modules: 'debug_info qtcharts qtnetworkauth qtquick3d qtquicktimeline qtscript qtwebengine qtwebglplugin' + archives: 'd3dcompiler_47 opengl32sw qt3d qtactiveqt qtbase qtimageformats qtmultimedia qtquickcontrols qtquickcontrols2 qtscxml qtspeech qtsvg qttools qttranslations qtwebchannel qtwebsockets qtwebview qtwinextras qtxmlpatterns' + cache: true + cache-key-prefix: 'install-qt-action' + setup-python: 'false' + tools: '' + set-env: 'true' + tools-only: 'false' + aqtversion: '==3.1.*' + + - name: Install pip + run: | + SETUPTOOLS_USE_DISTUTILS=stdlib python3 -m pip install --user --upgrade -r ./requirements.txt + shell: msys2 {0} + + - name: Install pip + run: | + which perl + export QT_HOME=c:/Qt/5.15.2/msvc2019_64 + cmake -B _build -G "Visual Studio 17 2022" -A x64 -DRV_DEPS_WIN_PERL_ROOT=c:/Strawberry/perl/bin -DCMAKE_BUILD_TYPE=Release -DRV_DEPS_QT5_LOCATION=$QT_HOME -DRV_VFX_PLATFORM=CY2023 + shell: msys2 {0} + + \ No newline at end of file