Skip to content

wintest

wintest #1998

Workflow file for this run

name: "wintest"
on:
push:
branches:
- 'main'
- 'release-**'
paths:
- '**/wintest.yml'
- 'pkg/winfsp/*.go'
- '**/*_windows.go'
pull_request:
branches:
- 'main'
- 'release-**'
paths:
- '**/wintest.yml'
- 'pkg/winfsp/*.go'
- '**/*_windows.go'
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
schedule:
- cron: '0 17 * * 0'
jobs:
wintest:
runs-on: windows-2022
env:
Actions_Allow_Unsecure_Commands: true
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.21'
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup MSBuild.exe
if: false
uses: microsoft/[email protected]
- name: Change Winsdk Version
if: false
uses: GuillaumeFalourd/setup-windows10-sdk-action@v1
with:
sdk-version: 18362
- name: Download WinFsp
run: |
choco install wget
mkdir "C:\wfsp\"
wget -O winfsp.msi https://github.com/winfsp/winfsp/releases/download/v2.0/winfsp-2.0.23075.msi
copy winfsp.msi "C:\wfsp\"
choco install 7zip -y
- name: Install WinFsp
run: |
# call start-process to install winfsp.msi
Start-Process -Wait -FilePath "C:\wfsp\winfsp.msi" -ArgumentList "/quiet /norestart"
ls "C:\Program Files (x86)\WinFsp"
ls "C:\Program Files (x86)\WinFsp\bin"
- name: Set up Include Headers
run: |
mkdir "C:\WinFsp\inc\fuse"
copy .\hack\winfsp_headers\* C:\WinFsp\inc\fuse\
dir "C:\WinFsp\inc\fuse"
set CGO_CFLAGS=-IC:/WinFsp/inc/fuse
go env
go env -w CGO_CFLAGS=-IC:/WinFsp/inc/fuse
go env
- name: Install Scoop
run: |
dir "C:\Program Files (x86)\WinFsp"
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iwr -useb 'https://raw.githubusercontent.com/scoopinstaller/install/master/install.ps1' -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
echo $env:USERNAME
scoop
scoop install redis
scoop install minio@2021-12-10T23-03-39Z
scoop install runasti
- name: Download winsw
run: |
wget https://github.com/winsw/winsw/releases/download/v2.12.0/WinSW-x64.exe -q --show-progress -O winsw.exe
ls winsw.exe
- name: Start Redis
run: |
copy winsw.exe redis-service.exe
echo "<service>" >> redis-service.xml
echo "<id>redisredis</id>" >> redis-service.xml
echo "<name>redisredis</name>" >> redis-service.xml
echo "<description>redisredis</description>" >> redis-service.xml
echo "<executable>C:\Users\$env:USERNAME\scoop\shims\redis-server.exe</executable>" >> redis-service.xml
echo "<logmode>rotate</logmode>" >> redis-service.xml
echo "</service>" >> redis-service.xml
.\redis-service.exe install
net start redisredis
- name: Download MinGW
run: |
wget https://github.com/niXman/mingw-builds-binaries/releases/download/14.2.0-rt_v12-rev1/x86_64-14.2.0-release-win32-seh-msvcrt-rt_v12-rev1.7z -q --show-progress -O mingw.7z
7z.exe x mingw.7z -oC:\mingw64
ls C:\mingw64\bin
- name: Build Juicefs
run: |
$env:CGO_ENABLED=1
$env:PATH+=";C:\mingw64\bin"
go build -ldflags="-s -w" -o juicefs.exe .
- name: Install Python2
run: |
choco install python2 -y
- name: Juicefs Format
run: |
./juicefs.exe format redis://127.0.0.1:6379/1 myjfs
- name: Juicefs Mount
run: |
$env:PATH+=";C:\Program Files (x86)\WinFsp\bin"
./juicefs.exe mount -d redis://127.0.0.1:6379/1 z: --fuse-trace-log c:/fuse.log
- name: Run Winfsp Tests
run: |
wget https://github.com/juicedata/winfsp/releases/download/testing_suit_20250324/winfsp-tests-x64.exe -q --show-progress -O "C:\Program Files (x86)\WinFsp\bin\winfsp-tests-x64.exe"
ls "C:\Program Files (x86)\WinFsp\bin\winfsp-tests-x64.exe"
cd Z:
& "C:\Program Files (x86)\WinFsp\bin\winfsp-tests-x64.exe" --fuse-external --resilient --case-insensitive-cmp
- name: Run winfstest
run: |
wget https://github.com/juicedata/winfstest/releases/download/testing_20250313/TestSuite-x64-v4.zip -q --show-progress -O Z:\TestSuite-x64.zip
ls Z:\TestSuite-x64.zip
cd Z:\
Expand-Archive -Path .\TestSuite-x64.zip -DestinationPath .\TestSuite
ls Z:\TestSuite
cd Z:\TestSuite\TestSuite
./run-winfstest.ps1
- name: Run FSX Test
run: |
cd Z:\
wget https://github.com/chenjie4255/fstools/releases/download/v0.0.1/fsx-x64.exe -q --show-progress -O fsx.exe
ls fsx.exe
./fsx.exe -d 180 -p 10000 -F 100000 fsxtest
- name: Run basic subcommand tests
run: |
echo hi > Z:\hi.txt
./juicefs.exe info Z:\hi.txt
./juicefs.exe status redis://127.0.0.1:6379/1
./juicefs.exe debug Z:\
New-Item -Path 'Z:\summary' -ItemType Directory
echo hi > Z:\summary\1.txt
echo hi > Z:\summary\2.txt
./juicefs.exe summary Z:\summary
./juicefs.exe info Z:\summary\1.txt
./juicefs.exe stats Z: -c 5
- name: Setup tmate session
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3