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
20 changes: 20 additions & 0 deletions .github/workflows/check-msrv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check MSRV

on: [push]

jobs:
msrv:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Run check
run: |
# extract the MSRV from Root `Cargo.toml`
MSRV=$(grep '^rust-version ' Cargo.toml | cut -d= -f2- | tr -d ' "')
rustup default "${MSRV}"
cargo check --all-targets
37 changes: 37 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Run the Rust tests 🦀

on: [push]

env:
NEOPDF_DATA_PATH: ${{ github.workspace }}/navis-cli/tests/fixtures

jobs:
test:
name: Build and test navis
runs-on: ubuntu-latest
defaults:
run:
shell: bash --login {0}

steps:
- uses: actions/checkout@v4

- name: Get data
uses: ./.github/actions/cache-data

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Cache cargo registry and build artifacts
uses: Swatinem/rust-cache@v2

- name: Lint (clippy)
run: cargo clippy --workspace --all-targets

- name: Build
run: cargo build --workspace --release

- name: Run regression tests
run: cargo test --workspace --release
9 changes: 6 additions & 3 deletions maintainer/download-data.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ NEOPDF_SETS=(
)

PINEAPPL_GRIDS=(
SIHP-PP-POLARIZED-STAR-2006-LO.pineappl.lz4
SIHP-PP-UNPOLARIZED-STAR-2006-LO.pineappl.lz4
SIHP-PP-POLARIZED-STAR-2006-LO
SIHP-PP-UNPOLARIZED-STAR-2006-LO
)

# Store the data in the root of the repository
Expand All @@ -19,11 +19,14 @@ test -d navis-cli/tests/fixtures/ || mkdir -p navis-cli/tests/fixtures/

# Download PineAPPL grids
for grid in "${PINEAPPL_GRIDS[@]}"; do
wget --no-verbose --no-clobber -P navis-cli/tests/fixtures/ "https://data.nnpdf.science/neopdf/data/${grid}.neopdf.lz4"
wget --no-verbose --no-clobber -P navis-cli/tests/fixtures/ "https://data.nnpdf.science/neopdf/navis/${grid}.pineappl.lz4"
done

# Download NeoPDF sets
for lha in "${NEOPDF_SETS[@]}"; do
# TODO: edit info file fot the FF set
curl "https://lhapdfsets.web.cern.ch/current/${lha}.tar.gz" | tar xzf - --no-same-owner -C navis-cli/tests/fixtures/
done

# Fix FF set metadata: fragfn -> timelike
sed -i 's/SetType: fragfn/SetType: timelike/g' navis-cli/tests/fixtures/NNFF10_PIsum_lo/NNFF10_PIsum_lo.info
Loading