Allow redundant methods in Record #659
Workflow file for this run
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: Test | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 14 * * 2' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "stable" | |
- name: Install FFTW and GSL | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libfftw3-dev libgsl-dev | |
- run: cargo build --all-targets | |
- run: cargo build --all-targets --features gsl,fftw-source --no-default-features | |
- run: cargo build --all-targets --features gsl,fftw-system --no-default-features | |
- run: cargo build --all-targets --features gsl,fftw-mkl --no-default-features | |
- run: cargo build --all-targets --features gsl,fftw-source,ceres-source --no-default-features | |
- run: cargo build --all-targets --features fftw-source,ceres-source --no-default-features | |
msrv-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install GSL | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgsl-dev | |
- name: Get minimum supported Rust version | |
run: echo "::set-output name=msrv::$(grep '^rust-version = ' Cargo.toml | grep -o '[0-9.]\+')" | |
id: get_msrv | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ steps.get_msrv.outputs.msrv }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "msrv" | |
# Build "normal" target only, see https://github.com/light-curve/light-curve-feature/issues/74 | |
- run: cargo +${{ steps.get_msrv.outputs.msrv }} build --no-default-features --features ceres-source,fftw-source,gsl | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install FFTW and GSL | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libfftw3-dev libgsl-dev | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "stable" | |
- run: cargo test --no-default-features --features=ceres-source,fftw-source,gsl | |
test-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install FFTW and GSL | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libfftw3-dev libgsl-dev | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "stable" | |
- run: cargo test --profile=release-with-debug --no-default-features --features=ceres-source,fftw-source,gsl | |
examples: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install FFTW and GSL | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libfftw3-dev libgsl-dev | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "stable" | |
- run: cargo run --example plot_snia_curve_fits --no-default-features --features=ceres-source,fftw-source,gsl -- -n=1 | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: cargo fmt -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install FFTW and GSL | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libfftw3-dev libgsl-dev | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "stable" | |
- run: cargo clippy --all-targets --no-default-features --features=ceres-source,fftw-source,gsl -- -D warnings | |
fmt-test-util: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: test-util | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- run: cargo fmt -- --check | |
clippy-test-util: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: test-util | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "test-util" | |
- run: cargo clippy --all-targets -- -D warnings | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "stable" | |
- name: Generate code coverage | |
run: | | |
cargo llvm-cov --no-report --no-default-features --features=ceres-source,fftw-source,gsl | |
cargo llvm-cov run --example=plot_snia_curve_fits --no-report --no-default-features --features=ceres-source,fftw-source,gsl -- -n=1 | |
cargo llvm-cov report --lcov --output-path lcov.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: lcov.info | |
fail_ci_if_error: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
arm: | |
runs-on: [self-hosted, linux, ARM64] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: build | |
run: cargo build --all-targets --no-default-features --features=ceres-source,fftw-source,gsl | |
macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install gsl | |
run: brew install gsl | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "macos" | |
- run: cargo build --all-targets --no-default-features --features=ceres-source,fftw-source,gsl | |
windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "windows" | |
- run: cargo build --all-targets --no-default-features --features=fftw-source |