Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provision GNU MP on Windows using vcpkg #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions .github/workflows/d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected]
with:
compiler: ${{ matrix.dc }}
- name: 'Provision dependencies via vcpkg'
run: |
vcpkg install gmp
- name: 'Build & Test'
run: |
dub build
dub test
2 changes: 0 additions & 2 deletions src/gmp/f.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@
module gmp.f;

import gmp.z;

pragma(lib, "gmp");
2 changes: 0 additions & 2 deletions src/gmp/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ module gmp;
public import gmp.z;
public import gmp.q;
public import gmp.f;

pragma(lib, "gmp");
2 changes: 0 additions & 2 deletions src/gmp/q.d
Original file line number Diff line number Diff line change
Expand Up @@ -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");
1 change: 0 additions & 1 deletion src/gmp/z.d
Original file line number Diff line number Diff line change
Expand Up @@ -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`