name: Build
on:
push:
branches:
- "*"
paths-ignore:
- "docs/**"
- "README.md"
- "CHANGES.md"
- "CONTRIBUTING.md"
- "LICENSE"
pull_request:
branches:
- "*"
- "!wheel*"
types:
- opened
- synchronize
- reopened
- closed
paths-ignore:
- "docs/**"
- "README.md"
- "CHANGES.md"
- "CONTRIBUTING.md"
- "LICENSE"
jobs:
rust:
name: rust build and test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [macos, ubuntu, windows]
runs-on: ${{ format('{0}-latest', matrix.os) }}
env:
SATKIT_DATA: astro-data
SATKIT_TESTVEC_ROOT: satkit-testvecs
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- name: Cache Satkit Data
id: cache-satkit-data
uses: actions/cache@v4
with:
path: astro-data
enableCrossOsArchive: true
key: satkit-data-cache
- name: Download Satkit Data
if: steps.cache-satkit-data.outputs.cache-hit != 'true'
run: |
python -m pip install requests
python python/test/download_data.py astro-data
- name: Cache Satkit Test Vectors
id: cache-satkit-testvecs
uses: actions/cache@v4
with:
path: satkit-testvecs
enableCrossOsArchive: true
key: satkit-testvecs-cache
- name: Download Satkit Test Vectors
if: steps.cache-satkit-testvecs.outputs.cache-hit != 'true'
run: |
python -m pip install requests
python python/test/download_testvecs.py satkit-testvecs
- name: Cargo Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build
run: cargo build --release
- name: Test
run: cargo test --features chrono
- name: Doc
run: cargo doc --no-deps
python:
name: python bindings test
runs-on: ubuntu-latest
env:
SATKIT_DATA: astro-data
SATKIT_TESTVEC_ROOT: satkit-testvecs
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Cache Satkit Data
id: cache-satkit-data
uses: actions/cache@v4
with:
path: astro-data
enableCrossOsArchive: true
key: satkit-data-cache
- name: Download Satkit Data
if: steps.cache-satkit-data.outputs.cache-hit != 'true'
run: |
pip install requests
python python/test/download_data.py astro-data
- name: Cache Satkit Test Vectors
id: cache-satkit-testvecs
uses: actions/cache@v4
with:
path: satkit-testvecs
enableCrossOsArchive: true
key: satkit-testvecs-cache
- name: Download Satkit Test Vectors
if: steps.cache-satkit-testvecs.outputs.cache-hit != 'true'
run: |
pip install requests
python python/test/download_testvecs.py satkit-testvecs
- name: Cargo Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-python-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-python-
- name: Install satkit
run: pip install -e ".[test]"
- name: Run Python tests
run: pytest python/test/