Skip to content

Commit

Permalink
Squashed 'src/SfsClient/sfs-client/' content from commit cf18b357
Browse files Browse the repository at this point in the history
git-subtree-dir: src/SfsClient/sfs-client
git-subtree-split: cf18b357f43aa9bbaba7d8b3b3774b39140aa00f
  • Loading branch information
yao-msft committed Apr 24, 2024
0 parents commit f598670
Show file tree
Hide file tree
Showing 144 changed files with 14,300 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# -- Usage --
# Read README.md for initial context, and instructions for VSCode and command line.
#
# See here for the meaning of each item in this file: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# To get all the options that are part of a standard style such as Microsoft, do this:
# > clang-format --style=Microsoft -dump-config > clang-format-microsoft.txt
#
# -- Philosophy --
# We will try to adhere to the standard Microsoft style as much as possible.
# The overrides below are deviations from the standard. Keep it short.
---
Language: Cpp
BasedOnStyle: Microsoft

AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: true
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: false
InsertNewlineAtEOF: true
PackConstructorInitializers: CurrentLine
PointerAlignment: Left
7 changes: 7 additions & 0 deletions .cmake-format.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"first_comment_is_literal": "true",
"keyword_case": "upper",
"line_ending": "windows",
"max_pargs_hwrap": 3,
"tab_size": 4
}
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The SFS Client Reviewers team will be requested for review when someone opens a pull request.
* @microsoft/sfs-client-reviewers
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Dependabot helps maintain dependencies updated for different package ecosystems
#
# Here is the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

# Maintain dependencies for pip
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#### Related Issues

- Closes #<!--Related issue--> <!--When this PR is merged, the related issue will be closed-->
- Helps #<!--Related issue--> <!-- When this PR is merged, the related issue will remain open, but there will be a mention saved in the issue-->

#### Why is this change being made?

#### What is being changed?

#### How was the change tested?

<!-- Uncomment the relevant line below -->
<!-- - Current tests test this behavior: <testnames> -->
<!-- - New tests are being added: <testnames> -->
<!-- - Not a functional change. Ex: modifying documentation, auxiliary files, etc -->
56 changes: 56 additions & 0 deletions .github/workflows/install-winget/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Install WinGet

description: Installs WinGet from sources, caching the installation files if possible

inputs:
winget-installation-cache:
description: 'Where the installation files will be cached'
required: false
default: 'winget-installation-cache'

runs:
using: "composite"

steps:
- name: Cache WinGet installation
id: cache-winget-installation
uses: actions/cache@v4
with:
path: winget-installation-cache
key: winget-installation

# Winget is not available in the windows-latest image as it is Windows Server 2022 and winget is not yet available officially for it.
# We can still install it in "experimental" mode manually though.
- name: Install WinGet
shell: pwsh
run: |
# Check it doesn't exist to avoid installing it without need
if (!(Get-Command 'winget.exe' -CommandType Application -ErrorAction SilentlyContinue))
{
New-Item -ItemType Directory ${{ inputs.winget-installation-cache }} -Force | Out-Null
Set-Location ${{ inputs.winget-installation-cache }}
$ProgressPreference = "silentlyContinue"
$WingetInstaller = "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
if (!(Test-Path $WingetInstaller))
{
Write-Host "Downloading Winget"
Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.7.10582/$WingetInstaller -OutFile $WingetInstaller
}
$VCLibsInstaller = "Microsoft.VCLibs.x64.14.00.Desktop.appx"
if (!(Test-Path $VCLibsInstaller))
{
Write-Host "Downloading Winget dependency VCLibs"
Invoke-WebRequest -Uri https://aka.ms/$VCLibsInstaller -OutFile $VCLibsInstaller
}
$XamlInstaller = "Microsoft.UI.Xaml.2.8.x64.appx"
if (!(Test-Path $XamlInstaller))
{
Write-Host "Downloading Winget dependency Xaml"
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/$XamlInstaller -OutFile $XamlInstaller
}
Import-Module -Name Appx -UseWindowsPowershell | Out-Null
Add-AppxPackage $VCLibsInstaller
Add-AppxPackage $XamlInstaller
Add-AppxPackage $WingetInstaller
}
38 changes: 38 additions & 0 deletions .github/workflows/main-build-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Main Build (Ubuntu)

on:
push:
branches: [ "main" ]

# Permissions and environment values to be able to update the dependency graph with vcpkg information
permissions:
contents: write

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VCPKG_FEATURE_FLAGS: dependencygraph

jobs:
build-ubuntu:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup
run: source ./scripts/setup.sh

- name: Build and Test (no test overrides)
run: |
./scripts/build.sh
./scripts/test.sh --output-on-failure
- name: Build and Test (with test overrides)
run: |
./scripts/build.sh --enable-test-overrides
./scripts/test.sh --output-on-failure
- name: Build and Test (Release)
run: |
./scripts/build.sh --build-type Release
./scripts/test.sh --output-on-failure
45 changes: 45 additions & 0 deletions .github/workflows/main-build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Main Build (Windows)

on:
push:
branches: [ "main" ]

# Permissions and environment values to be able to update the dependency graph with vcpkg information
permissions:
contents: write

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VCPKG_FEATURE_FLAGS: dependencygraph

jobs:
build-windows:
runs-on: 'windows-latest'

steps:
- uses: actions/checkout@v4

- name: Install Winget
uses: ./.github/workflows/install-winget

- name: Setup
shell: pwsh
run: .\scripts\Setup.ps1 -NoBuildTools

- name: Build and Test (no test overrides)
shell: pwsh
run: |
.\scripts\Build.ps1
.\scripts\Test.ps1 -OutputOnFailure
- name: Build and Test (with test overrides)
shell: pwsh
run: |
.\scripts\Build.ps1 -EnableTestOverrides
.\scripts\Test.ps1 -OutputOnFailure
- name: Build and Test (Release)
shell: pwsh
run: |
.\scripts\Build.ps1 -BuildType Release
.\scripts\Test.ps1 -OutputOnFailure
75 changes: 75 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: PR Build

env:
# Set up vcpkg to read from the GitHub cache (https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache)
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'

on:
pull_request:
branches: [ "main" ]

jobs:
build-windows:
runs-on: 'windows-latest'

steps:
- uses: actions/checkout@v4

- name: Set up required environment variables for vcpkg cache
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install Winget
uses: ./.github/workflows/install-winget

- name: Setup
shell: pwsh
run: .\scripts\Setup.ps1 -NoBuildTools

- name: Check formatting
shell: pwsh
run: python .\scripts\check-format.py

- name: Build and Test (no test overrides)
shell: pwsh
run: |
.\scripts\Build.ps1
.\scripts\Test.ps1 -OutputOnFailure
- name: Build and Test (with test overrides)
shell: pwsh
run: |
.\scripts\Build.ps1 -EnableTestOverrides
.\scripts\Test.ps1 -OutputOnFailure
build-ubuntu:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up required environment variables for vcpkg cache
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Setup
run: source ./scripts/setup.sh

- name: Check formatting
run: python ./scripts/check-format.py

- name: Build and Test (no test overrides)
run: |
./scripts/build.sh
./scripts/test.sh --output-on-failure
- name: Build and Test (with test overrides)
run: |
./scripts/build.sh --enable-test-overrides
./scripts/test.sh --output-on-failure
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Build
/build

# VSCode specific folder
/.vscode

# Vcpkg
/vcpkg
/vcpkg_installed

# Formatting temporary file
/.tmp_formatted
Loading

0 comments on commit f598670

Please sign in to comment.