From 904e1fba0849023cd0fff31229084b90d282c532 Mon Sep 17 00:00:00 2001 From: Daisuke Oyama Date: Thu, 3 Jun 2021 21:35:35 +0900 Subject: [PATCH] CI: Add windows-latest (#43) * Modify type declaration for N in constructor of {H, V}Matrix * nashsolve (legacy format): call `:free` from standard library * CI: Add windows-latest * Update README.md [ci skip] --- .github/workflows/ci.yml | 6 ++++++ README.md | 2 -- src/matrix.jl | 4 ++-- src/nash.jl | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71982f0..d3819a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,9 @@ jobs: - version: '1' os: macOS-latest arch: x64 + - version: '1' + os: windows-latest + arch: x64 # See https://github.com/JuliaPolyhedra/LRSLib.jl/runs/2705442631?check_suite_focus=true#step:6:135 # - version: '1' # os: ubuntu-latest @@ -28,6 +31,9 @@ jobs: - version: 'nightly' os: macOS-latest arch: x64 + - version: 'nightly' + os: windows-latest + arch: x64 # - version: 'nightly' # os: ubuntu-latest # arch: x86 diff --git a/README.md b/README.md index 599c2dd..06aa5b5 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,6 @@ As written in the [user guide of lrs](http://cgm.cs.mcgill.ca/~avis/C/lrslib/USE I have [forked lrs](https://github.com/blegat/lrslib) to add a few functions to help doing the wrapper. These changes are not upstream yet so this version is used instead of the upstream version. -**Important notice**: Windows is not supported yet. - [build-img]: https://github.com/JuliaPolyhedra/LRSLib.jl/workflows/CI/badge.svg?branch=master [build-url]: https://github.com/JuliaPolyhedra/LRSLib.jl/actions?query=workflow%3ACI [codecov-img]: http://codecov.io/github/JuliaPolyhedra/LRSLib.jl/coverage.svg?branch=master diff --git a/src/matrix.jl b/src/matrix.jl index 7e0f513..286bed7 100644 --- a/src/matrix.jl +++ b/src/matrix.jl @@ -104,7 +104,7 @@ mutable struct HMatrix <: Polyhedra.MixedHRep{Rational{BigInt}} Q::Ptr{Clrs_dat} status::Symbol lin::Union{Nothing, LRSLinearitySpace} - function HMatrix(N::Int, P::Ptr{Clrs_dic}, Q::Ptr{Clrs_dat}) + function HMatrix(N::Integer, P::Ptr{Clrs_dic}, Q::Ptr{Clrs_dat}) @assert N == getd(P) m = new(N, P, Q, :AtNoBasis, nothing) finalizer(myfree, m) @@ -120,7 +120,7 @@ mutable struct VMatrix <: Polyhedra.MixedVRep{Rational{BigInt}} status::Symbol lin::Union{Nothing, LRSLinearitySpace} cone::Bool # If true, LRS will not return any point so we need to add the origin - function VMatrix(N::Int, P::Ptr{Clrs_dic}, Q::Ptr{Clrs_dat}) + function VMatrix(N::Integer, P::Ptr{Clrs_dic}, Q::Ptr{Clrs_dat}) @assert N + 1 == getd(P) m = _length(P) cone = !iszero(m) # If there is no ray and no point, it is empty so we should not add the origin diff --git a/src/nash.jl b/src/nash.jl index f57701a..801f7ec 100644 --- a/src/nash.jl +++ b/src/nash.jl @@ -279,7 +279,7 @@ function nashsolve(filename1::AbstractString, filename2::AbstractString) # From lrs_solve_nash_legacy if Q2.nlinearity > 0 - ccall((:free, liblrs), Cvoid, (Ptr{Cvoid},), Q2.linearity) + ccall(:free, Cvoid, (Ptr{Cvoid},), Q2.linearity) end ptr = @lrs_ccall2( xcalloc, Ptr{Cvoid}, (Clong, Clong, Clong, Cstring),