wintest #1880
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "wintest" | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| - 'release-**' | |
| paths: | |
| - '**/wintest.yml' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| - 'release-**' | |
| paths: | |
| - '**/wintest.yml' | |
| 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-2019 | |
| 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: | | |
| ./juicefs.exe mount -d redis://127.0.0.1:6379/1 myjfs z: | |
| - name: Test Juicefs | |
| run: | | |
| mkdir "Z:\dir" | |
| dir "Z:\dir" | |
| echo "hello" > "Z:\dir\hello.txt" | |
| dir "Z:\dir\hello.txt" | |
| type "Z:\dir\hello.txt" | |
| - name: Download Winfsp Test Binary | |
| run: | | |
| wget https://github.com/juicedata/winfsp/releases/download/testing_20250312/winfsp-tests-x64.exe -q --show-progress -O "C:\Program Files (x86)\WinFsp\bin\winfstest.exe" | |
| ls "C:\Program Files (x86)\WinFsp\bin\winfstest.exe" | |
| - name: Run Winfsp Test | |
| run: | | |
| cd "Z:\" | |
| "C:\Program Files (x86)\WinFsp\bin\winfsp-tests-x64.exe" --fuse-external --resilient | |
| - name: Download winfstest | |
| run: | | |
| wget https://github.com/juicedata/winfstest/releases/download/testing_20250313/TestSuite-x64.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 | |
| ./run-winfstest | |
| - 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: Setup tmate session | |
| if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
| uses: mxschmitt/action-tmate@v3 | |
| #there is go-fuse compile error with unit test | |
| #- name: Unit Test | |
| # run: | | |
| # rm pkg/meta/redis_test.go | |
| # rm pkg/meta/sql_test.go | |
| # rm pkg/meta/tkv_test.go | |
| # go test -v -cover ./pkg/... ./cmd/... | |
| # - name: Install Python2 | |
| # run: | | |
| # choco install python2 -y | |
| # - name: Build and Run Winfstest | |
| # run: | | |
| # git clone https://github.com/sanwan/winfstest.git | |
| # cd winfstest | |
| # msbuild.exe winfstest.sln | |
| # cd TestSuite | |
| # .\run-winfstest | |
| #cannot write file because of some permission question with winfsp | |
| #- name: Build and Run Winfstest in Jfs Directory | |
| # run: | | |
| # Z: | |
| # mkdir "Z:\tmptmp" | |
| # cd tmptmp | |
| # git clone https://github.com/sanwan/winfstest.git | |
| # cd winfstest | |
| # msbuild.exe winfstest.sln | |
| # cd TestSuite | |
| # .\run-winfstest |