diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 892eca3..4e80389 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,9 @@ jobs: - name: macos-arm64 runner: macos-latest target: aarch64-apple-darwin + - name: win-amd64 + runner: windows-latest + target: x86_64-pc-windows-msvc steps: - name: Checkout Code @@ -49,6 +52,10 @@ jobs: run: brew install ghostscript if: matrix.platform.runner == 'macos-latest' + - name: Install ghostscript (for windows) + run: choco install ghostscript + if: matrix.platform.runner == 'windows-latest' + - name: Run tests run: cargo test --locked --target ${{ matrix.platform.target }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 55ea470..7303d6c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,9 @@ jobs: - name: macos-arm64 runner: macos-latest target: aarch64-apple-darwin + - name: win-amd64 + runner: windows-latest + target: x86_64-pc-windows-msvc steps: - name: Checkout Code @@ -49,6 +52,10 @@ jobs: run: brew install ghostscript if: matrix.platform.runner == 'macos-latest' + - name: Install ghostscript (for windows) + run: choco install ghostscript + if: matrix.platform.runner == 'windows-latest' + - name: Build run: cargo build --locked --target ${{ matrix.platform.target }} diff --git a/src/pdf_converter.rs b/src/pdf_converter.rs index f4b89ba..1827554 100644 --- a/src/pdf_converter.rs +++ b/src/pdf_converter.rs @@ -20,7 +20,13 @@ where P: AsRef, Q: AsRef, { - Command::new("gs") + let command = if cfg!(target_os = "windows") { + "gswin64c" + } else { + "gs" + }; + + Command::new(command) .args(&[ "-q", "-dBATCH",