Skip to content
Merged
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
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version: ['1'] # Test against LTS
os: [ubuntu-latest, macOS-latest, windows-latest]
arch: [x64]
include:
# Also test against 32-bit Linux
- version: '1'
os: ubuntu-latest
arch: x86
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ MultivariatePolynomials = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3"
SemialgebraicSets = "8e049039-38e8-557d-ae3a-bc521ccf6204"

[compat]
JuMP = "0.21"
JuMP = "0.21.7"
MathOptInterface = "~0.9.6"
MultivariateBases = "0.1.2"
MultivariateMoments = "0.3"
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| **Build Status** |
|:----------------:|
| [![Build Status][build-img]][build-url] [![Build Status][winbuild-img]][winbuild-url] |
| [![Build Status][build-img]][build-url] |
| [![Codecov branch][codecov-img]][codecov-url] |

PolyJuMP is an extension to [JuMP](https://github.com/jump-dev/JuMP.jl) for formulating and solving polynomial optimization problems. These problems can then be solved using [Sum of Squares Programming](https://github.com/jump-dev/SumOfSquares.jl).
Expand All @@ -26,9 +26,7 @@ Some presentations on, or using, PolyJuMP (see [here](https://github.com/blegat/
[docs-stable-url]: https://jump.dev/SumOfSquares.jl/stable
[docs-latest-url]: https://jump.dev/SumOfSquares.jl/latest

[build-img]: https://travis-ci.org/jump-dev/PolyJuMP.jl.svg?branch=master
[build-url]: https://travis-ci.org/jump-dev/PolyJuMP.jl
[winbuild-img]: https://ci.appveyor.com/api/projects/status/2y6dc0j2xk4aa4v7?svg=true
[winbuild-url]: https://ci.appveyor.com/project/JuliaOpt/polyjump-jl
[build-img]: https://github.com/jump-dev/PolyJuMP.jl/workflows/CI/badge.svg?branch=master
[build-url]: https://github.com/jump-dev/PolyJuMP.jl/actions?query=workflow%3ACI
[codecov-img]: http://codecov.io/github/jump-dev/PolyJuMP.jl/coverage.svg?branch=master
[codecov-url]: http://codecov.io/github/jump-dev/PolyJuMP.jl?branch=master
36 changes: 0 additions & 36 deletions appveyor.yml

This file was deleted.

8 changes: 4 additions & 4 deletions test/constraint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ end
expected_str = string(JuMP.function_string(REPLMode, p), ' ',
JuMP._math_symbol(REPLMode, :in), ' ', jump_set)
@test sprint(show, MIME"text/plain"(), cref) == expected_str
expected_str = string("\$ ", JuMP.function_string(IJuliaMode, p), ' ',
expected_str = string("\$\$ ", JuMP.function_string(IJuliaMode, p), ' ',
JuMP._math_symbol(IJuliaMode, :in), ' ', jump_set,
" \$")
" \$\$")
@test sprint(show, MIME"text/latex"(), cref) == expected_str
@test set.basis == basis
if !isempty(kwargs)
Expand Down Expand Up @@ -71,14 +71,14 @@ end
in_sym = JuMP._math_symbol(REPLMode, :in)
eqref = @constraint(m, p == q)
@test sprint(show, MIME"text/plain"(), eqref) == "(β - α)x² + (α - β)xy + (-α)y² $in_sym PolyJuMP.ZeroPoly()"
@test sprint(show, MIME"text/latex"(), eqref) == "\$ (β - α)x^{2} + (α - β)xy + (-α)y^{2} \\in PolyJuMP.ZeroPoly() \$"
@test sprint(show, MIME"text/latex"(), eqref) == "\$\$ (β - α)x^{2} + (α - β)xy + (-α)y^{2} \\in PolyJuMP.ZeroPoly() \$\$"
sdref = @constraint(m, [p q; q p] in PSDCone())
if VERSION < v"1.4-"
@test sprint(show, MIME"text/plain"(), sdref) == "[(β)x² + (α)xy (α)x² + (β)xy + (α)y²;\n (α)x² + (β)xy + (α)y² (β)x² + (α)xy ] $in_sym Main.TestPolyModule.TestPosDefMatrix()"
else
@test sprint(show, MIME"text/plain"(), sdref) == "[(β)x² + (α)xy (α)x² + (β)xy + (α)y²;\n (α)x² + (β)xy + (α)y² (β)x² + (α)xy] $in_sym Main.TestPolyModule.TestPosDefMatrix()"
end
@test sprint(show, MIME"text/latex"(), sdref) == "\$ \\begin{bmatrix}\n(β)x^{2} + (α)xy & (α)x^{2} + (β)xy + (α)y^{2}\\\\\n(α)x^{2} + (β)xy + (α)y^{2} & (β)x^{2} + (α)xy\\\\\n\\end{bmatrix} \\in Main.TestPolyModule.TestPosDefMatrix() \$"
@test sprint(show, MIME"text/latex"(), sdref) == "\$\$ \\begin{bmatrix}\n(β)x^{2} + (α)xy & (α)x^{2} + (β)xy + (α)y^{2}\\\\\n(α)x^{2} + (β)xy + (α)y^{2} & (β)x^{2} + (α)xy\\\\\n\\end{bmatrix} \\in Main.TestPolyModule.TestPosDefMatrix() \$\$"
end

@testset "NonNeg" begin
Expand Down