Skip to content

Commit

Permalink
Merge branch 'next-major'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrjabs committed Oct 14, 2024
2 parents f07d288 + f06bb1c commit 7ebbc67
Show file tree
Hide file tree
Showing 175 changed files with 12,506 additions and 5,076 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
30 changes: 30 additions & 0 deletions .github/workflows/batsat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: BatSat

on:
push:
branches: [ "main", "next-major" ]
pull_request:
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always

jobs:
build-test:
name: Build and test
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: "build-test"
- name: Cargo build
run: cargo build -p rustsat-batsat --verbose
- name: Cargo test
run: cargo test -p rustsat-batsat --verbose
4 changes: 2 additions & 2 deletions .github/workflows/cadical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CaDiCaL

on:
push:
branches: [ "main" ]
branches: [ "main", "next-major" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/capi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: C-API

on:
push:
branches: [ "main" ]
branches: [ "main", "next-major" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always
Expand All @@ -14,7 +14,7 @@ jobs:
name: Build and test
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4
- name: Check
run: "[ \"$(grep '^version = ' rustsat/Cargo.toml)\" = \"$(grep '^version = ' capi/Cargo.toml)\" ]"
run: "[ \"$(grep '^version = ' Cargo.toml)\" = \"$(grep '^version = ' capi/Cargo.toml)\" ]"

cbindgen:
name: Test generated C header
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: Docs

on:
push:
branches: [ "main" ]
branches: [ "main", "next-major" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: "-Dwarnings"

jobs:
doc:
Expand All @@ -27,7 +28,11 @@ jobs:
run: |
cargo install cargo-rdme
return=true
for dir in rustsat tools cadical kissat minisat glucose ipasir capi pyapi; do
if ! cargo rdme --check; then
echo "failed for main crate"
return=false
fi
for dir in tools cadical kissat minisat glucose batsat ipasir capi pyapi; do
cd ${dir}
if ! cargo rdme --check; then
echo "failed for ${dir}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/glucose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Glucose

on:
push:
branches: [ "main" ]
branches: [ "main", "next-major" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ipasir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: IPASIR

on:
push:
branches: [ "main" ]
branches: [ "main", "next-major" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/kissat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Kissat

on:
push:
branches: [ "main" ]
branches: [ "main", "next-major" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/minisat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Minisat

on:
push:
branches: [ "main" ]
branches: [ "main", "next-major" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ name: GitHub Pages

on:
push:
tags:
- 'rustsat-v*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
branches: [ "main" ]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Lints

on:
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- uses: Swatinem/rust-cache@v2
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/pyapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ name: Python Build

on:
push:
branches:
- main
branches: [ "main", "next-major" ]
tags:
- '*'
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]
workflow_dispatch:

permissions:
Expand All @@ -23,7 +22,7 @@ jobs:
name: Build and test
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
Expand Down Expand Up @@ -57,7 +56,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4
- name: Check
run: "[ \"$(grep '^version = ' rustsat/Cargo.toml)\" = \"$(grep '^version = ' pyapi/Cargo.toml)\" ]"
run: "[ \"$(grep '^version = ' Cargo.toml)\" = \"$(grep '^version = ' pyapi/Cargo.toml)\" ]"

linux:
runs-on: ubuntu-latest
Expand All @@ -84,15 +83,15 @@ jobs:

pystubs:
name: Test python stubs
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Install maturin from PyPI
uses: install-pinned/maturin@3d59037009f92def8f023f3b3e4810179477786d
uses: install-pinned/maturin@ab13013f30551a87b56c6a9c2bdd7b6287581def
- name: Install mypy from PyPI
uses: install-pinned/mypy@52365a71b7d64ebed3db400b67077d3e91a769b4
uses: install-pinned/mypy@b894abac469541f33f8957d4aa33b24e4464161e
- name: Install python project
run: maturin build -m pyapi/Cargo.toml && pip install --no-index --find-links target/wheels/ rustsat
- name: Test stubs
Expand Down Expand Up @@ -144,12 +143,13 @@ jobs:
path: dist

sdist:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
maturin-version: '1.6.0'
command: sdist
args: --out dist --manifest-path pyapi/Cargo.toml
- name: Upload sdist
Expand Down
35 changes: 33 additions & 2 deletions .github/workflows/rustsat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: RustSAT

on:
push:
branches: [ "main" ]
branches: [ "main", "next-major" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -34,3 +34,34 @@ jobs:
run: cargo test -p rustsat --verbose --features=all
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{ fromJSON('["", "4"]')[matrix.os == 'macos-latest'] }}
- name: CaDiCaL external solver
if: matrix.os == 'ubuntu-latest'
run: |
curl -O https://media.christophjabs.info/cadical-2-0-0
chmod +x cadical-2-0-0
RS_EXT_SOLVER=./cadical-2-0-0 cargo test --test external_solver --verbose -- --ignored
- name: Kissat external solver
if: matrix.os == 'ubuntu-latest'
run: |
curl -O https://media.christophjabs.info/kissat-3-1-1
chmod +x kissat-3-1-1
RS_EXT_SOLVER=./kissat-3-1-1 cargo test --test external_solver --verbose -- --ignored
- name: Gimsatul external solver
if: matrix.os == 'ubuntu-latest'
run: |
curl -O https://media.christophjabs.info/gimsatul-1-1-2
chmod +x gimsatul-1-1-2
RS_EXT_SOLVER=./gimsatul-1-1-2 cargo test --test external_solver --verbose -- --ignored
kani:
runs-on: ubuntu-20.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Cargo kani
uses: model-checking/kani-github-action@v1
with:
args: '-p rustsat'

6 changes: 5 additions & 1 deletion .github/workflows/semver-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Semver checks

on:
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -43,3 +43,7 @@ jobs:
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
package: rustsat-ipasir
- name: BatSat
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
package: rustsat-batsat
4 changes: 2 additions & 2 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: RustSAT Tools

on:
push:
branches: [ "main" ]
branches: [ "main", "next-major" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "next-major" ]

env:
CARGO_TERM_COLOR: always
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/target
/Cargo.lock

**/*.o
**/*.out
Expand Down
Loading

0 comments on commit 7ebbc67

Please sign in to comment.