Kdesktop 1359 vfs functions should return an exit info #2666
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: Windows kDrive desktop CI | |
on: | |
pull_request: | |
types: [synchronize, review_requested] | |
concurrency: | |
group: windows-${{ github.head_ref }} | |
cancel-in-progress: true | |
env: | |
KDRIVE_TEST_CI_API_TOKEN: ${{ secrets.KDRIVE_TOKEN }} | |
KDRIVE_TEST_CI_ACCOUNT_ID: ${{ vars.KDRIVE_TEST_CI_ACCOUNT_ID }} | |
KDRIVE_TEST_CI_USER_ID: ${{ vars.KDRIVE_TEST_CI_USER_ID }} | |
KDRIVE_TEST_CI_DRIVE_ID: ${{ vars.KDRIVE_TEST_CI_DRIVE_ID }} | |
KDRIVE_TEST_CI_REMOTE_DIR_ID: ${{ vars.KDRIVE_TEST_CI_REMOTE_DIR_ID }} | |
KDRIVE_TEST_CI_LOCAL_PATH: ${{ vars.KDRIVE_TEST_CI_LOCAL_PATH }} | |
KDRIVE_TEST_CI_REMOTE_PATH: ${{ vars.KDRIVE_TEST_CI_REMOTE_PATH }} | |
jobs: | |
build-kDrive: | |
runs-on: [ self-hosted, Windows, desktop-kdrive ] | |
steps: | |
- name: Load system Path into Github environment | |
run : echo Path=%Path%>> %GITHUB_ENV% | |
shell: cmd | |
- name: Checkout the PR | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.head_ref }} | |
submodules: recursive | |
- name: Clean the log directory | |
run : rm -r -force C:/Windows/Temp/kDrive-logdir/* | |
- name: Restore extension packages | |
run : nuget restore extensions/windows/cfapi/kDriveExt.sln | |
- name: Import Windows virtual certificate | |
env: | |
WINDOWS_VIRTUAL_CERT: ${{ secrets.WINDOWS_VIRTUAL_CERT }} | |
WINDOWS_VIRTUAL_CERT_PASSWORD: ${{ secrets.WINDOWS_VIRTUAL_CERT_PASSWORD }} | |
run: | | |
New-Item -ItemType directory -Path certificate | |
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_VIRTUAL_CERT | |
certutil -decode certificate/tempCert.txt certificate/certificate.pfx | |
Remove-Item -path certificate -include tempCert.txt | |
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_VIRTUAL_CERT_PASSWORD -Force -AsPlainText) | |
- name: Build kDrive desktop | |
run: | | |
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvars64.bat" | |
set COVFILE=%cd%\src\test.cov | |
call "cov01.exe" -1 | |
powershell ./infomaniak-build-tools/windows/build-drive.ps1 -ci | |
shell: cmd | |
- name: Execute tests | |
run: | | |
$env:COVFILE="$pwd\src\test.cov" | |
& "cov01.exe" "-1" # coverage on | |
./infomaniak-build-tools/run-tests.ps1 | |
- name: Compute code coverage | |
if: false | |
run : | | |
rm -Force -ErrorAction SilentlyContinue BullseyeCoverageExclusions | |
echo "exclude folder 3rdparty/\nexclude folder ../" >> BullseyeCoverageExclusions | |
$env:COVFILE="$pwd\src\test.cov" | |
& "cov01.exe" "-0" # coverage off | |
& "covselect.exe" "--import" "BullseyeCoverageExclusions" | |
& "covxml.exe" "-f" "$env:COVFILE" "-o" "coverage.xml" | |
- name: Install sonar-scanner | |
if: false | |
uses: SonarSource/sonarcloud-github-c-cpp@v3 | |
env: | |
SONAR_HOST_URL: https://sonarcloud.io | |
- name: Run sonar-scanner | |
if: false | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
SONAR_TOKEN: ${{ secrets.SONAR_DESKTOP_KDRIVE_TOKEN }} | |
SONAR_HOST_URL: https://sonarcloud.io | |
run: > | |
sonar-scanner | |
--define sonar.projectKey="Infomaniak_desktop-kDrive" | |
--define sonar.organization="infomaniak" | |
--define sonar.host.url="https://sonarcloud.io" | |
--define sonar.sources="src" | |
--define sonar.exclusions="src/3rdparty/**" | |
--define sonar.cfamily.compile-commands="build-windows/build/compile_commands.json" | |
--define sonar.cfamily.bullseye.reportPaths="coverage.xml" | |
- name: Upload tests logs artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-tests-logs | |
path: C:/Windows/Temp/kDrive-logdir/* | |
retention-days: 3 | |
overwrite: true | |
if: always() | |
- name: Clean-up generated code | |
run : powershell ./infomaniak-build-tools/windows/build-drive.ps1 -clean all |