Skip to content

Commit

Permalink
Merge pull request #25 from bung87/ci-platforms
Browse files Browse the repository at this point in the history
Ci platforms
  • Loading branch information
bung87 authored Dec 24, 2023
2 parents fe8892d + 326aec9 commit 865566c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 26 deletions.
38 changes: 13 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions psutil.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ skipDirs = @["tests"]
# Dependencies
requires "nim >= 1.2.6"
requires "unpack"

when defined(windows):
requires "winim"
2 changes: 1 addition & 1 deletion src/psutil/psutil_windows.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 865566c

Please sign in to comment.