diff --git a/.github/workflows/check-msrv.yml b/.github/workflows/check-msrv.yml new file mode 100644 index 0000000..5456f5e --- /dev/null +++ b/.github/workflows/check-msrv.yml @@ -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 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..af0ee80 --- /dev/null +++ b/.github/workflows/test.yaml @@ -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 diff --git a/maintainer/download-data.sh b/maintainer/download-data.sh old mode 100644 new mode 100755 index 621b9c3..cb841f4 --- a/maintainer/download-data.sh +++ b/maintainer/download-data.sh @@ -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 @@ -19,7 +19,7 @@ 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 @@ -27,3 +27,6 @@ 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