Skip to content

Fix format warning for st_size base type linux vs mac #53

Fix format warning for st_size base type linux vs mac

Fix format warning for st_size base type linux vs mac #53

Workflow file for this run

name: OpenCloud Desktop CI
on:
push:
branches:
- main
- 'stable-[0-9]+.[0-9]+'
- 'stable-[0-9]+.[0-9]+.[0-9]+'
pull_request:
workflow_dispatch:
inputs:
releaseChannel:
description: 'The release channel'
required: true
default: 'stable'
type: choice
options:
- stable
- beta
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
defaults:
run:
shell: pwsh
jobs:
# ------------------------------------------------------------------------------------------------------------------------------------------
build:
permissions:
# actions/upload-artifact doesn't need contents: write
contents: read
strategy:
fail-fast: true
matrix:
include:
- target: linux-gcc-x86_64
os: ubuntu-latest
container: invent-registry.kde.org/sysadmin/ci-images/craft-appimage:latest
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
env:
CRAFT_TARGET: ${{ matrix.target }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CRAFT_PACKAGE_SYMBOLS: ${{ github.event_name != 'pull_request' }}
container: ${{ matrix.container }}
steps:
- name: Check out full source code for tooling
if: ${{ matrix.target == 'linux-gcc-x86_64' }}
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check out latest commit
if: ${{ matrix.target != 'linux-gcc-x86_64' }}
uses: actions/checkout@v6
- name: Restore and update cache
if: github.event_name != 'pull_request'
uses: actions/cache@v5
with:
path: |
~/ccache
key: ${{ runner.os }}-${{ matrix.target }}-${{ github.run_id }} # generate a new key every time to trigger an update
restore-keys: ${{ runner.os }}-${{ matrix.target }}
- name: Restore cache
if: github.event_name == 'pull_request'
uses: actions/cache/restore@v5
with:
path: |
~/ccache
key: ${{ runner.os }}-${{ matrix.target }}
- name: Clone CraftMaster
run: |
git clone --depth=1 https://invent.kde.org/kde/craftmaster.git "${home}/craft/CraftMaster/CraftMaster"
- name: Craft setup
run: |
New-Item -Path ~/cache -ItemType Directory -ErrorAction SilentlyContinue
# disable git's safe.directory
git config --global --add safe.directory '*'
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" --setup
- name: Craft unshelve
run: |
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --unshelve "${env:GITHUB_WORKSPACE}/.craft.shelf"
# bootsrtap in case the shelf was empty
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c craft
# ccache
if (-not $IsWindows) {
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c dev-utils/ccache
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --run "ccache -M500MB"
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --run "ccache -s"
}
- name: Prepare
run: |
New-Item -ItemType Directory "${env:GITHUB_WORKSPACE}/binaries/"
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --set "srcDir=${env:GITHUB_WORKSPACE}" opencloud/openvfs
if($IsLinux) {
# ensure we have fuse3-devel installed
dnf install -y fuse3-devel
}
- name: Install dependencies
run: |
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --install-deps opencloud/openvfs
- name: clang-format format lint
if: matrix.target == 'OFF_linux-gcc-x86_64'
run: |
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c libs/llvm
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --run git clang-format --force ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
$diff = git diff
if ($diff) {
$diff
exit 1
}
- name: Update Shelf
run: |
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --shelve "${env:GITHUB_WORKSPACE}/.craft.shelf"
Copy-Item "${env:GITHUB_WORKSPACE}/.craft.shelf" "${env:GITHUB_WORKSPACE}/binaries/craft.shelf"
- name: Build
run: |
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache opencloud/openvfs
- name: Run tests
run: |
& "${env:GITHUB_WORKSPACE}/.github/workflows/.craft.ps1" -c --no-cache opencloud/openvfs