Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions .github/workflows/_build_and_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,11 @@ on:

jobs:

QC:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Environment Variables
uses: "./.github/workflows/setup"
- name: Quality Control
uses: "./.github/workflows/qc"

Test:
needs: QC
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Environment Variables
uses: "./.github/workflows/setup"
- name: "Test (Backend)"
uses: "./.github/workflows/test"

Build:
needs: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -46,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand Down
65 changes: 44 additions & 21 deletions .github/workflows/build/windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,77 @@ inputs:
cacheOnly:
type: boolean
default: false
msvcVersion:
type: string
default: '19.44'
required: true

runs:
using: "composite"
steps:

- name: Install Chocolatey Dependencies
shell: bash
run: choco install -y ninja

- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: ${{ env.pythonVersion }}

# - name: Install Downgraded MSVC
# shell: powershell
# run: |
# # For versions update see here: https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022
# Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
# $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
# $componentsToInstall= @(
# "Microsoft.VisualStudio.Component.VC.${{ inputs.msvcVersion }}.x86.x64"
# "Microsoft.VisualStudio.Component.VC.${{ inputs.msvcVersion }}.ATL"
# )
# [string]$workloadArgs = $componentsToInstall | ForEach-Object {" --add " + $_}
# $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# # should be run twice
# $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
# $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.x'

- name: Install Python Dependencies
shell: bash
run: pip3 install aqtinstall
run: pip3 install py7zr==1.1.0 aqtinstall conan

- name: Retrieve Qt Cache
id: cache-qt
uses: actions/cache@v4
with:
key: windows-qt-${{ env.qtVersion }}
path: ${{ runner.temp }}\qt
# - name: Retrieve Qt Cache
# id: cache-qt
# uses: actions/cache@v4
# with:
# key: windows-qt-${{ env.qtVersion }}
# path: ${{ runner.temp }}\qt

- name: Install Qt
# if: ${{ steps.cache-qt.outputs.cache-hit != 'true' }}
# if: ${{ steps.cache-qt.outputs.cache-hit != 'true' }}
shell: bash
run: |
aqt install-qt --outputdir ${RUNNER_TEMP}/qt windows desktop ${{ env.qtVersion }} win64_msvc2019_64 -m all

- name: Remove /usr/bin/link
shell: bash
run: |
echo "Removing /usr/bin/link.exe since it will conflict with our MSVC paths..."
rm -rf /usr/bin/link.exe

- name: Setup MSVC Compiler
uses: ilammy/msvc-dev-cmd@v1
# with:
# toolset: ${{ inputs.msvcVersion }}

- name: Build Frontend
shell: bash
run: |
cd frontend

Qt6_DIR="${RUNNER_TEMP}\qt\${{ env.qtVersion }}\msvc2019_64"
export PATH="${Qt6_DIR}\bin;$PATH"
echo $Qt6_DIR
ls $Qt6_DIR

mkdir build && cd build

cmake --preset ci-windows
cmake --build --preset build
cmake ../ -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl
#cmake --preset ci-windows
#cmake --build --preset build

- name: Deploy Runtime Libs
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ runs:
shell: bash
run: |
set -ex
echo "pythonVersion=3.10" >> ${GITHUB_ENV}
echo "qtVersion=6.3.*" >> ${GITHUB_ENV}
echo "pythonVersion=3.11" >> ${GITHUB_ENV}
echo "qtVersion=6.4.2" >> ${GITHUB_ENV}

- name: Get Code Version
shell: bash
Expand Down
Loading