-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (39 loc) · 1.61 KB
/
CI.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# GitHub Actions definition for CI build.
name: CI Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
WinBuildTest:
name: Windows build and test
runs-on: windows-2022 # 2019 is not sufficient, Windows 21H1+ is best for ReFS bug fixes
steps:
- uses: actions/checkout@v2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
# No "with: dotnet-version" specified -> use global.json
- run: dotnet restore
- run: dotnet build --configuration Release --no-restore
- name: Shrink C drive and create a ReFS E drive, then run tests
run: |
mkdir c:\ReFS
dir c:\
echo SELECT VOLUME C: >DiskPartScript.txt
echo SHRINK DESIRED=10240 >>DiskPartScript.txt
echo CREATE PARTITION PRIMARY >>DiskPartScript.txt
echo LIST PARTITION >>DiskPartScript.txt
echo FORMAT QUICK FS=ReFS LABEL="ReFS Test" >>DiskPartScript.txt
echo ASSIGN LETTER=E >>DiskPartScript.txt
echo LIST VOLUME >>DiskPartScript.txt
echo ASSIGN MOUNT=C:\ReFS >>DiskPartScript.txt
diskpart /s DiskPartScript.txt
if not exist E:\ echo ERROR: diskpart failed && exit /b 1
if not exist C:\ReFS echo ERROR: diskpart failed && exit /b 1
@rem CODESYNC: WindowsReFSDriveSession.cs
set CoW_Test_ReFS_Drive=E:\
dotnet test --configuration Release --no-build
shell: cmd