Skip to content

Commit f598670

Browse files
committed
Squashed 'src/SfsClient/sfs-client/' content from commit cf18b357
git-subtree-dir: src/SfsClient/sfs-client git-subtree-split: cf18b357f43aa9bbaba7d8b3b3774b39140aa00f
0 parents  commit f598670

File tree

144 files changed

+14300
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+14300
-0
lines changed

.clang-format

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
#
3+
# -- Usage --
4+
# Read README.md for initial context, and instructions for VSCode and command line.
5+
#
6+
# See here for the meaning of each item in this file: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
7+
# To get all the options that are part of a standard style such as Microsoft, do this:
8+
# > clang-format --style=Microsoft -dump-config > clang-format-microsoft.txt
9+
#
10+
# -- Philosophy --
11+
# We will try to adhere to the standard Microsoft style as much as possible.
12+
# The overrides below are deviations from the standard. Keep it short.
13+
---
14+
Language: Cpp
15+
BasedOnStyle: Microsoft
16+
17+
AllowAllArgumentsOnNextLine: false
18+
AllowAllParametersOfDeclarationOnNextLine: false
19+
AlwaysBreakBeforeMultilineStrings: true
20+
AlwaysBreakTemplateDeclarations: Yes
21+
BinPackArguments: false
22+
BinPackParameters: false
23+
BraceWrapping:
24+
AfterCaseLabel: true
25+
BreakConstructorInitializers: BeforeComma
26+
BreakStringLiterals: false
27+
InsertNewlineAtEOF: true
28+
PackConstructorInitializers: CurrentLine
29+
PointerAlignment: Left

.cmake-format.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"first_comment_is_literal": "true",
3+
"keyword_case": "upper",
4+
"line_ending": "windows",
5+
"max_pargs_hwrap": 3,
6+
"tab_size": 4
7+
}

.github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# The SFS Client Reviewers team will be requested for review when someone opens a pull request.
2+
* @microsoft/sfs-client-reviewers

.github/ISSUE_TEMPLATE/bug_report.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Additional context**
24+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Dependabot helps maintain dependencies updated for different package ecosystems
2+
#
3+
# Here is the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
9+
# Maintain dependencies for GitHub Actions
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "weekly"
14+
15+
# Maintain dependencies for pip
16+
- package-ecosystem: "pip"
17+
directory: "/"
18+
schedule:
19+
interval: "weekly"

.github/pull_request_template.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#### Related Issues
2+
3+
- Closes #<!--Related issue--> <!--When this PR is merged, the related issue will be closed-->
4+
- Helps #<!--Related issue--> <!-- When this PR is merged, the related issue will remain open, but there will be a mention saved in the issue-->
5+
6+
#### Why is this change being made?
7+
8+
#### What is being changed?
9+
10+
#### How was the change tested?
11+
12+
<!-- Uncomment the relevant line below -->
13+
<!-- - Current tests test this behavior: <testnames> -->
14+
<!-- - New tests are being added: <testnames> -->
15+
<!-- - Not a functional change. Ex: modifying documentation, auxiliary files, etc -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Install WinGet
2+
3+
description: Installs WinGet from sources, caching the installation files if possible
4+
5+
inputs:
6+
winget-installation-cache:
7+
description: 'Where the installation files will be cached'
8+
required: false
9+
default: 'winget-installation-cache'
10+
11+
runs:
12+
using: "composite"
13+
14+
steps:
15+
- name: Cache WinGet installation
16+
id: cache-winget-installation
17+
uses: actions/cache@v4
18+
with:
19+
path: winget-installation-cache
20+
key: winget-installation
21+
22+
# Winget is not available in the windows-latest image as it is Windows Server 2022 and winget is not yet available officially for it.
23+
# We can still install it in "experimental" mode manually though.
24+
- name: Install WinGet
25+
shell: pwsh
26+
run: |
27+
# Check it doesn't exist to avoid installing it without need
28+
if (!(Get-Command 'winget.exe' -CommandType Application -ErrorAction SilentlyContinue))
29+
{
30+
New-Item -ItemType Directory ${{ inputs.winget-installation-cache }} -Force | Out-Null
31+
Set-Location ${{ inputs.winget-installation-cache }}
32+
$ProgressPreference = "silentlyContinue"
33+
$WingetInstaller = "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
34+
if (!(Test-Path $WingetInstaller))
35+
{
36+
Write-Host "Downloading Winget"
37+
Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.7.10582/$WingetInstaller -OutFile $WingetInstaller
38+
}
39+
$VCLibsInstaller = "Microsoft.VCLibs.x64.14.00.Desktop.appx"
40+
if (!(Test-Path $VCLibsInstaller))
41+
{
42+
Write-Host "Downloading Winget dependency VCLibs"
43+
Invoke-WebRequest -Uri https://aka.ms/$VCLibsInstaller -OutFile $VCLibsInstaller
44+
}
45+
$XamlInstaller = "Microsoft.UI.Xaml.2.8.x64.appx"
46+
if (!(Test-Path $XamlInstaller))
47+
{
48+
Write-Host "Downloading Winget dependency Xaml"
49+
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/$XamlInstaller -OutFile $XamlInstaller
50+
}
51+
52+
Import-Module -Name Appx -UseWindowsPowershell | Out-Null
53+
Add-AppxPackage $VCLibsInstaller
54+
Add-AppxPackage $XamlInstaller
55+
Add-AppxPackage $WingetInstaller
56+
}
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Main Build (Ubuntu)
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
# Permissions and environment values to be able to update the dependency graph with vcpkg information
8+
permissions:
9+
contents: write
10+
11+
env:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
VCPKG_FEATURE_FLAGS: dependencygraph
14+
15+
jobs:
16+
build-ubuntu:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup
23+
run: source ./scripts/setup.sh
24+
25+
- name: Build and Test (no test overrides)
26+
run: |
27+
./scripts/build.sh
28+
./scripts/test.sh --output-on-failure
29+
30+
- name: Build and Test (with test overrides)
31+
run: |
32+
./scripts/build.sh --enable-test-overrides
33+
./scripts/test.sh --output-on-failure
34+
35+
- name: Build and Test (Release)
36+
run: |
37+
./scripts/build.sh --build-type Release
38+
./scripts/test.sh --output-on-failure
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Main Build (Windows)
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
# Permissions and environment values to be able to update the dependency graph with vcpkg information
8+
permissions:
9+
contents: write
10+
11+
env:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
VCPKG_FEATURE_FLAGS: dependencygraph
14+
15+
jobs:
16+
build-windows:
17+
runs-on: 'windows-latest'
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Install Winget
23+
uses: ./.github/workflows/install-winget
24+
25+
- name: Setup
26+
shell: pwsh
27+
run: .\scripts\Setup.ps1 -NoBuildTools
28+
29+
- name: Build and Test (no test overrides)
30+
shell: pwsh
31+
run: |
32+
.\scripts\Build.ps1
33+
.\scripts\Test.ps1 -OutputOnFailure
34+
35+
- name: Build and Test (with test overrides)
36+
shell: pwsh
37+
run: |
38+
.\scripts\Build.ps1 -EnableTestOverrides
39+
.\scripts\Test.ps1 -OutputOnFailure
40+
41+
- name: Build and Test (Release)
42+
shell: pwsh
43+
run: |
44+
.\scripts\Build.ps1 -BuildType Release
45+
.\scripts\Test.ps1 -OutputOnFailure

.github/workflows/pr.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: PR Build
2+
3+
env:
4+
# Set up vcpkg to read from the GitHub cache (https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache)
5+
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
6+
7+
on:
8+
pull_request:
9+
branches: [ "main" ]
10+
11+
jobs:
12+
build-windows:
13+
runs-on: 'windows-latest'
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up required environment variables for vcpkg cache
19+
uses: actions/github-script@v7
20+
with:
21+
script: |
22+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
23+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
24+
25+
- name: Install Winget
26+
uses: ./.github/workflows/install-winget
27+
28+
- name: Setup
29+
shell: pwsh
30+
run: .\scripts\Setup.ps1 -NoBuildTools
31+
32+
- name: Check formatting
33+
shell: pwsh
34+
run: python .\scripts\check-format.py
35+
36+
- name: Build and Test (no test overrides)
37+
shell: pwsh
38+
run: |
39+
.\scripts\Build.ps1
40+
.\scripts\Test.ps1 -OutputOnFailure
41+
42+
- name: Build and Test (with test overrides)
43+
shell: pwsh
44+
run: |
45+
.\scripts\Build.ps1 -EnableTestOverrides
46+
.\scripts\Test.ps1 -OutputOnFailure
47+
48+
build-ubuntu:
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Set up required environment variables for vcpkg cache
55+
uses: actions/github-script@v7
56+
with:
57+
script: |
58+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
59+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
60+
61+
- name: Setup
62+
run: source ./scripts/setup.sh
63+
64+
- name: Check formatting
65+
run: python ./scripts/check-format.py
66+
67+
- name: Build and Test (no test overrides)
68+
run: |
69+
./scripts/build.sh
70+
./scripts/test.sh --output-on-failure
71+
72+
- name: Build and Test (with test overrides)
73+
run: |
74+
./scripts/build.sh --enable-test-overrides
75+
./scripts/test.sh --output-on-failure

.gitignore

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
# Build
35+
/build
36+
37+
# VSCode specific folder
38+
/.vscode
39+
40+
# Vcpkg
41+
/vcpkg
42+
/vcpkg_installed
43+
44+
# Formatting temporary file
45+
/.tmp_formatted

0 commit comments

Comments
 (0)