Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mahrud committed Oct 17, 2024
1 parent bb63d1f commit 89809dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ name: Build and Test Macaulay2

on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- development
schedule:
- cron: '0 6 * * SUN' # runs tests on the main branch every Sunday at 06:00 UTC
- test

concurrency:
# Cancel in-progress runs when a new workflow with the same group name is triggered
Expand All @@ -28,17 +25,14 @@ defaults:

jobs:
build:
if: github.repository == 'Macaulay2/M2' || contains(github.ref, 'global')
name: ${{ matrix.build-system }}-${{ matrix.os }}-${{ matrix.compiler }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build-system:
- autotools
- cmake
os:
- ubuntu-24.04
- macos-13
compiler:
- default
Expand Down Expand Up @@ -141,7 +135,9 @@ jobs:
- name: Build Macaulay2 using Ninja
if: matrix.build-system == 'cmake'
run: |
cmake --build . --target M2-core M2-emacs install-packages
cmake --build . --target M2-core M2-emacs install-SumsOfSquares
cmake --build . --target check-SumsOfSquares
ctest -R SumsOfSquares
if [[ "${{ runner.os }}" == "Linux" ]] && [[ "${{ matrix.build-system }}" == "cmake" ]]; then
sudo apt-get install -y -q --no-install-recommends dpkg-dev
echo "GIT_COMMIT=`git describe --dirty --always --match HEAD`" >> $GITHUB_ENV
Expand Down
4 changes: 4 additions & 0 deletions M2/Macaulay2/packages/SumsOfSquares.m2
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,15 @@ createSOSModel(Matrix,Matrix) := o -> (F,v) -> (
vvT := entries(v* transpose v);
mons := g -> set first entries monomials g;
K1 := toList \\ sum \\ mons \ flatten vvT;
print K1;

-- monomials in F and not in vvT
lmf := sum \\ mons \ flatten entries F;
print lmf;
K2 := toList(lmf - K1);
print K2;
K := K1 | K2;
print K;

-- Linear constraints: b
b := map(kk^#K, kk^1, (i,j) -> coefficient(K#i,F_(0,0)) );
Expand Down

0 comments on commit 89809dc

Please sign in to comment.