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
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ env:
# A fixed version used for testing, so that the builds don't
# spontaneously break after a few years.
RUST_VERSION: "1.90.0"
MIN_RUST_VERSION: "1.85.0"
CARGO_TERM_COLOR: always

jobs:
Expand Down Expand Up @@ -50,6 +51,21 @@ jobs:
- name: check
run: cargo +${RUST_VERSION} test

# Validate minimum supported Rust version declared in `Cargo.toml`.
# Note that warnings are allowed as some may appear due to backwards
# compatiblity issues.
minimum-supported:
name: Minimum version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rust version
run: rustup install ${MIN_RUST_VERSION}
- name: check
run: cargo +${MIN_RUST_VERSION} check --all-features
- name: check
run: cargo +${MIN_RUST_VERSION} test --all-features

# Run tests on macOS.
test-macos:
needs: check
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish to crates.io

on:
push:
tags:
- 'v*.*.*'
- 'v*.*.*-alpha.*'
- 'v*.*.*-beta.*'
- 'v*.*.*-rc.*'

env:
MIN_RUST_VERSION: "1.85.0"

jobs:
# Validate minimum supported Rust version declared in `Cargo.toml`.
# Note that warnings are allowed as some may appear due to backwards
# compatiblity issues.
minimum-supported:
name: Minimum version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rust version
run: rustup install ${MIN_RUST_VERSION}
- name: check
run: cargo +${MIN_RUST_VERSION} check --all-features
- name: check
run: cargo +${MIN_RUST_VERSION} test --all-features

crates_io_publish:
name: Publish (Crates.io)
needs:
- minimum-supported
permissions:
contents: write # required to create a release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rust version
run: rustup install ${MIN_RUST_VERSION}
- run: cargo publish --token "${{ env.CRATES_IO_API_TOKEN }}"
env:
CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }}
- name: Create draft release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.tag }}
draft: true
body: "This is a release draft generated by Github Actions..."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ build = "build.rs"
description = "Bindings for CU Decision Diagram library (CUDD)"
repository = "https://github.com/pclewis/cudd-sys"
license = "CC0-1.0"
# This is the minimum version that support Rust 2024. If you ever
# increase this version, please also update in both Github Actions workflows.
rust-version = "1.85"

[dependencies]
libc = "0.2"
Expand Down