Release cspice-sys 1.0.4, allow cspice usage from different threads (#8) #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: ${{ matrix.SHELL }} | |
env: | |
CSPICE_DIR: '${{ github.workspace }}/cspice' | |
CSPICE_URL: ${{ matrix.CSPICE_URL }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
include: | |
- os: ubuntu-latest | |
CSPICE_URL: "https://naif.jpl.nasa.gov/pub/naif/toolkit//C/PC_Linux_GCC_64bit/packages/cspice.tar.Z" | |
SHELL: bash | |
- os: macos-latest | |
CSPICE_URL: "https://naif.jpl.nasa.gov/pub/naif/toolkit//C/MacIntel_OSX_AppleC_64bit/packages/cspice.tar.Z" | |
SHELL: bash | |
- os: windows-latest | |
CSPICE_URL: "https://naif.jpl.nasa.gov/pub/naif/toolkit//C/PC_Windows_VisualC_64bit/packages/cspice.zip" | |
SHELL: powershell | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download CSPICE | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: wget ${{ matrix.CSPICE_URL }} | |
- name: Download CSPICE (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: wget ${{ matrix.CSPICE_URL }} -outfile cspice.zip | |
- name: Extract CSPICE | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: tar -zxvf "${CSPICE_URL##*/}" | |
- name: Extract CSPICE (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: tar -xf cspice.zip | |
- name: Fix libcspice name | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: mv $CSPICE_DIR/lib/cspice.a $CSPICE_DIR/lib/libcspice.a | |
- name: Cargo Test | |
run: cargo test -- --nocapture --test-threads=1 | |
- name: Cargo Clippy Check | |
run: cargo clippy --workspace -- -D warnings | |
build_with_auto_download: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cargo Test | |
run: cargo test --features downloadcspice -- --nocapture --test-threads=1 | |
- name: Cargo Clippy Check | |
run: cargo clippy --features downloadcspice --workspace -- -D warnings | |
check_style: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cargo Format Check | |
run: cargo fmt -- --check | |
- name: Cargo Sort Check | |
run: cargo install cargo-sort && cargo-sort --check --workspace |