diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b8686cf..460a1ff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,32 +6,20 @@ jobs: tests: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: - - ubuntu-latest - # only Linux currently supported - # - macOS-latest - # - windows-latest - nimversion: - - stable + - ubuntu-latest + - macOS-latest + - windows-latest + nim: + - 'stable' # - devel steps: - - uses: actions/checkout@v2 - - uses: iffy/install-nim@v5 - with: - nimversion: ${{ matrix.nimversion }} - - # - name: Install Linux deps - # if: runner.os == 'Linux' - # run: | - # sudo apt-get update -q - # - name: Install macOS deps - # if: runner.os == 'macOS' - # run: | - # brew update - # brew install libsodium - - - name: Test - run: | - nimble refresh - nimble test + - uses: actions/checkout@v3 + - name: Setup nim + uses: jiro4989/setup-nim-action@v1 + with: + nim-version: ${{ matrix.nim }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: nimble test -Y diff --git a/psutil.nimble b/psutil.nimble index 8af2447..8b47eff 100644 --- a/psutil.nimble +++ b/psutil.nimble @@ -9,3 +9,6 @@ skipDirs = @["tests"] # Dependencies requires "nim >= 1.2.6" requires "unpack" + +when defined(windows): + requires "winim" diff --git a/src/psutil/psutil_windows.nim b/src/psutil/psutil_windows.nim index 8d254c4..4cea8f8 100644 --- a/src/psutil/psutil_windows.nim +++ b/src/psutil/psutil_windows.nim @@ -58,7 +58,7 @@ proc psutil_get_drive_type*( drive_type: UINT ): string = proc psutil_get_drive_type*(drive: string): string = - var drive_type = GetDriveTypeA(cast[LPCSTR](drive)) + var drive_type = GetDriveType(drive) case drive_type of DRIVE_FIXED: "fixed" of DRIVE_CDROM: "cdrom"