Skip to content

Commit c230b1a

Browse files
authored
Update to MP@v0.5 (#51)
* Update to MP@v0.5 * Add Github Action ci * Fix test * 32-bit fix
1 parent 06dc9e6 commit c230b1a

File tree

4 files changed

+54
-8
lines changed

4 files changed

+54
-8
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [master]
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
jobs:
8+
test:
9+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- version: '1.6'
16+
os: ubuntu-latest
17+
arch: x64
18+
- version: '1'
19+
os: ubuntu-latest
20+
arch: x64
21+
- version: '1'
22+
os: ubuntu-latest
23+
arch: x86
24+
# - version: 'nightly'
25+
# os: ubuntu-latest
26+
# arch: x64
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: julia-actions/setup-julia@v1
30+
with:
31+
version: ${{ matrix.version }}
32+
arch: ${{ matrix.arch }}
33+
- uses: actions/cache@v1
34+
env:
35+
cache-name: cache-artifacts
36+
with:
37+
path: ~/.julia/artifacts
38+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
39+
restore-keys: |
40+
${{ runner.os }}-test-${{ env.cache-name }}-
41+
${{ runner.os }}-test-
42+
${{ runner.os }}-
43+
- uses: julia-actions/julia-buildpkg@v1
44+
- uses: julia-actions/julia-runtest@v1
45+
with:
46+
depwarn: error
47+
- uses: julia-actions/julia-processcoverage@v1
48+
- uses: codecov/codecov-action@v1
49+
with:
50+
file: lcov.info

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1111

1212
[compat]
1313
julia = "1"
14-
MultivariatePolynomials = "^0.2, ^0.3, ^0.4"
14+
MultivariatePolynomials = "^0.2, ^0.3, ^0.4, ^0.5"
1515
StaticArrays = "^0.8, ^0.9, ^0.10, ^0.11, ^0.12, 1"
1616

1717
[extras]

src/StaticPolynomials.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@ __precompile__()
22

33
module StaticPolynomials
44

5-
import MultivariatePolynomials
6-
const MP = MultivariatePolynomials
5+
import MultivariatePolynomials as MP
76
import StaticArrays: SVector, MVector, SMatrix
87
import LinearAlgebra
9-
if VERSION < v"1.0-"
10-
import LinearAlgebra: gradient
11-
end
128

139
include("helpers.jl")
1410
include("sexponents.jl")

test/basic_tests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
@test exponents(f2) == [0 2 1 0; 0 0 1 2]
1313
@test nvariables(f2) == 2
1414
@test coefficients(f2) == [1, 2, 3, 4]
15-
@test coefficienttype(f2) == Int64
16-
@test permutation(f2) == [4, 1, 2, 3]
15+
@test coefficienttype(f2) == Int
16+
@test permutation(f2) == [1, 4, 3, 2]
1717
f2_2 = Polynomial(2x^2+4y^2+3x*y+1)
1818
@test f2 == f2_2
1919

0 commit comments

Comments
 (0)