diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 2de37eb..bcd552f 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -14,12 +14,12 @@ permissions: contents: read jobs: - test: - name: Build and Test + test-ubuntu: + name: Build and Test on Ubuntu strategy: fail-fast: false matrix: - os: [ubuntu-latest] # TODO: provision gmp.lib using https://github.com/marketplace/actions/run-vcpkg and then add ‘windows-latest’ to list of os + os: [ubuntu-latest] dc: - dmd-latest - ldc-latest @@ -37,3 +37,28 @@ jobs: run: | dub build dub test + test-windows: + name: Build and Test on Windows + strategy: + fail-fast: false + matrix: + os: [windows-latest] # TODO: provision gmp.lib using https://github.com/marketplace/actions/run-vcpkg and then add ‘windows-latest’ to list of os + dc: + - dmd-latest + - ldc-latest + runs-on: ${{ matrix.os }} + steps: + - uses: lukka/run-vcpkg@v10 + with: + vcpkgGitCommitId: "9bf374fb6d99f8973ec8781d3b41ffac2defee63" + - uses: actions/checkout@v3 + - uses: dlang-community/setup-dlang@v1.3.0 + with: + compiler: ${{ matrix.dc }} + - name: 'Provision dependencies via vcpkg' + run: | + vcpkg install gmp + - name: 'Build & Test' + run: | + dub build + dub test diff --git a/src/gmp/f.d b/src/gmp/f.d index 8103079..7e37b85 100644 --- a/src/gmp/f.d +++ b/src/gmp/f.d @@ -2,5 +2,3 @@ module gmp.f; import gmp.z; - -pragma(lib, "gmp"); diff --git a/src/gmp/package.d b/src/gmp/package.d index f60aa06..b83ef13 100644 --- a/src/gmp/package.d +++ b/src/gmp/package.d @@ -5,5 +5,3 @@ module gmp; public import gmp.z; public import gmp.q; public import gmp.f; - -pragma(lib, "gmp"); diff --git a/src/gmp/q.d b/src/gmp/q.d index 506a9ce..bdd6645 100644 --- a/src/gmp/q.d +++ b/src/gmp/q.d @@ -686,5 +686,3 @@ package extern(C) pragma(inline, false) void __gmpq_abs (mpq_ptr, mpq_srcptr); void __gmpq_inv (mpq_ptr, mpq_srcptr); } - -pragma(lib, "gmp"); diff --git a/src/gmp/z.d b/src/gmp/z.d index 19b03ed..6eb0d36 100644 --- a/src/gmp/z.d +++ b/src/gmp/z.d @@ -3961,5 +3961,4 @@ package extern(C) pragma(inline, false) int __gmpz_divisible_ui_p(mpz_srcptr, ulong); } -pragma(lib, "gmp"); pragma(lib, "c"); // needed by `malloc` and `free`