Skip to content

Commit

Permalink
CI: Add windows-latest (#43)
Browse files Browse the repository at this point in the history
* 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]
  • Loading branch information
oyamad authored Jun 3, 2021
1 parent d300fac commit 904e1fb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/nash.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 904e1fb

Please sign in to comment.