From 1f59debecbcef49a10cd68152291eb4bda600691 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 5 Jul 2024 10:39:19 +0200 Subject: [PATCH 01/24] Do not download LHAPDF from Wayback machine --- maintainer/pineappl-ci/script.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/maintainer/pineappl-ci/script.sh b/maintainer/pineappl-ci/script.sh index c5b61312..d0dc91cd 100755 --- a/maintainer/pineappl-ci/script.sh +++ b/maintainer/pineappl-ci/script.sh @@ -36,9 +36,8 @@ cargo install --locked cargo-c --version ${CARGOC_V} --features=vendored-openssl # remove files generated by cargo rm -r /usr/local/cargo/registry -# install LHAPDF - use Wayback Machine as a mirror if hepforge is offline -( curl "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-${LHAPDF_V}.tar.gz" || \ - curl "https://web.archive.org/web/20211018095814/https://lhapdf.hepforge.org/downloads/?f=LHAPDF-6.4.0.tar.gz" ) | tar xzf - +# install LHAPDF +curl "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-${LHAPDF_V}.tar.gz" | tar xzf - cd LHAPDF-${LHAPDF_V} # compile static libraries with PIC to make statically linking PineAPPL's CLI work # see also https://users.rust-lang.org/t/why-does-crelocation-model-dynamic-no-pic-help-although-it-shouldnt/109012 From 40577bce1e06e78c1cb0ac7696e090784a0cc9a4 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 5 Jul 2024 10:41:19 +0200 Subject: [PATCH 02/24] Disable workflows for this branch --- .github/workflows/capi.yaml | 1 + .github/workflows/msrv.yml | 1 + .github/workflows/python.yml | 1 + .github/workflows/rust.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/capi.yaml b/.github/workflows/capi.yaml index 316c89c1..86dbbb36 100644 --- a/.github/workflows/capi.yaml +++ b/.github/workflows/capi.yaml @@ -4,6 +4,7 @@ on: push: branches-ignore: - pycli + - update-container-2 env: # our GLIBC version is too old to support Node 20: diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index 068baa8b..b2d43b33 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -4,6 +4,7 @@ on: push: branches-ignore: - pycli + - update-container-2 env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 51d2a256..56968325 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -4,6 +4,7 @@ on: push: branches-ignore: - pycli + - update-container-2 jobs: test: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4371d1d3..77869523 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,6 +4,7 @@ on: push: branches-ignore: - pycli + - update-container-2 defaults: run: From 23520836d6f7fc85a2c6a08a3c686e367a6b9033 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 5 Jul 2024 11:02:40 +0200 Subject: [PATCH 03/24] Debug why LHAPDF download fails --- maintainer/pineappl-ci/script.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maintainer/pineappl-ci/script.sh b/maintainer/pineappl-ci/script.sh index d0dc91cd..53ae7cd4 100755 --- a/maintainer/pineappl-ci/script.sh +++ b/maintainer/pineappl-ci/script.sh @@ -36,8 +36,12 @@ cargo install --locked cargo-c --version ${CARGOC_V} --features=vendored-openssl # remove files generated by cargo rm -r /usr/local/cargo/registry +# enable tracing +set -x + # install LHAPDF -curl "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-${LHAPDF_V}.tar.gz" | tar xzf - +curl "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-${LHAPDF_V}.tar.gz" > "LHAPDF-${LHAPDF_V}.tar.gz" +tar xzf "LHAPDF-${LHAPDF_V}.tar.gz" cd LHAPDF-${LHAPDF_V} # compile static libraries with PIC to make statically linking PineAPPL's CLI work # see also https://users.rust-lang.org/t/why-does-crelocation-model-dynamic-no-pic-help-although-it-shouldnt/109012 From 46c6327be883a0a166918e978df66cf7fdd4983d Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 5 Jul 2024 12:08:22 +0200 Subject: [PATCH 04/24] Follow redirects when downloading LHAPDF --- maintainer/pineappl-ci/script.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/maintainer/pineappl-ci/script.sh b/maintainer/pineappl-ci/script.sh index 53ae7cd4..b53c4715 100755 --- a/maintainer/pineappl-ci/script.sh +++ b/maintainer/pineappl-ci/script.sh @@ -40,8 +40,7 @@ rm -r /usr/local/cargo/registry set -x # install LHAPDF -curl "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-${LHAPDF_V}.tar.gz" > "LHAPDF-${LHAPDF_V}.tar.gz" -tar xzf "LHAPDF-${LHAPDF_V}.tar.gz" +curl -L "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-${LHAPDF_V}.tar.gz" | tar xzf - cd LHAPDF-${LHAPDF_V} # compile static libraries with PIC to make statically linking PineAPPL's CLI work # see also https://users.rust-lang.org/t/why-does-crelocation-model-dynamic-no-pic-help-although-it-shouldnt/109012 From 258eb0baf9181925775dcad93fa4121cbabe0dd0 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 5 Jul 2024 12:19:23 +0200 Subject: [PATCH 05/24] Follow redirects when downloading APPLgrid --- maintainer/pineappl-ci/script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintainer/pineappl-ci/script.sh b/maintainer/pineappl-ci/script.sh index b53c4715..e1c329b6 100755 --- a/maintainer/pineappl-ci/script.sh +++ b/maintainer/pineappl-ci/script.sh @@ -65,7 +65,7 @@ ldconfig cd .. # install APPLgrid -curl "https://applgrid.hepforge.org/downloads?f=applgrid-${APPLGRID_V}.tgz" | tar xzf - +curl -L "https://applgrid.hepforge.org/downloads?f=applgrid-${APPLGRID_V}.tgz" | tar xzf - cd applgrid-${APPLGRID_V} # compile static libraries with PIC to make statically linking PineAPPL's CLI work ./configure --without-root --with-pic=yes From bf202559df816a5a8dfe95f94eafb0769fa1af8a Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 5 Jul 2024 12:37:28 +0200 Subject: [PATCH 06/24] Disable tracing --- maintainer/pineappl-ci/script.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/maintainer/pineappl-ci/script.sh b/maintainer/pineappl-ci/script.sh index e1c329b6..cfbc0810 100755 --- a/maintainer/pineappl-ci/script.sh +++ b/maintainer/pineappl-ci/script.sh @@ -36,9 +36,6 @@ cargo install --locked cargo-c --version ${CARGOC_V} --features=vendored-openssl # remove files generated by cargo rm -r /usr/local/cargo/registry -# enable tracing -set -x - # install LHAPDF curl -L "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-${LHAPDF_V}.tar.gz" | tar xzf - cd LHAPDF-${LHAPDF_V} From 31619574c78c9d98b14828ea3f255bc05bb55016 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 5 Jul 2024 12:37:42 +0200 Subject: [PATCH 07/24] Install Tanjona's polarized PDF set --- maintainer/pineappl-ci/script.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maintainer/pineappl-ci/script.sh b/maintainer/pineappl-ci/script.sh index cfbc0810..2dc2457c 100755 --- a/maintainer/pineappl-ci/script.sh +++ b/maintainer/pineappl-ci/script.sh @@ -52,6 +52,9 @@ for pdf in NNPDF31_nlo_as_0118_luxqed NNPDF40_nnlo_as_01180 NNPDF40_nlo_as_01180 curl "https://lhapdfsets.web.cern.ch/current/${pdf}.tar.gz" | tar xzf - -C /usr/local/share/LHAPDF done +# install Tanjona's polarized PDF set +curl "https://data.nnpdf.science/pineappl/pdfs/240608-tr-pol-nlo-100.tar.gz" | tar xzf - -C /usr/local/share/LHAPDF + # install zlib compiled with `-fPIC` curl "https://www.zlib.net/zlib-${ZLIB_V}.tar.gz" | tar xzf - cd zlib-${ZLIB_V} From 91746ba44299e8433bdea8741f8b925ba2ad4ae0 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 11:07:05 +0200 Subject: [PATCH 08/24] Minimize Rust toolchain size --- maintainer/pineappl-ci/script.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maintainer/pineappl-ci/script.sh b/maintainer/pineappl-ci/script.sh index 2dc2457c..1fce78fc 100755 --- a/maintainer/pineappl-ci/script.sh +++ b/maintainer/pineappl-ci/script.sh @@ -10,10 +10,11 @@ cc -Q -v test.c echo "---" # install rustup -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y for version in ${RUST_V}; do # the last command will be the default + rustup install ${version} --profile minimal rustup default ${version} # install LLVM tools needed for code coverage # this is now called `llvm-tools`, but for 1.64 it's still called `llvm-tools-preview` From 9dba6a476ec09a16b6db6bb897979e3ce4322529 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 11:21:41 +0200 Subject: [PATCH 09/24] Change base image to debian:10-slim --- maintainer/pineappl-ci/Containerfile | 4 ++- maintainer/pineappl-ci/script.sh | 42 ++++++++++++---------------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/maintainer/pineappl-ci/Containerfile b/maintainer/pineappl-ci/Containerfile index bbfe715b..afc8c2e5 100644 --- a/maintainer/pineappl-ci/Containerfile +++ b/maintainer/pineappl-ci/Containerfile @@ -1,4 +1,6 @@ -FROM quay.io/pypa/manylinux2014_x86_64 +# with debian:10 Rust has linking problems, see this description: +# https://github.com/rust-lang/rust/issues/79946#issuecomment-1693289299 +FROM debian:11-slim ARG APPLGRID_V=1.6.36 # must be at least 0.9.16, see https://github.com/NNPDF/pineappl/pull/242#issuecomment-1705371291 diff --git a/maintainer/pineappl-ci/script.sh b/maintainer/pineappl-ci/script.sh index 1fce78fc..7ca7977d 100755 --- a/maintainer/pineappl-ci/script.sh +++ b/maintainer/pineappl-ci/script.sh @@ -2,12 +2,18 @@ set -euo pipefail -# print this so we can see whether the compiler/linker has `--enable-default-pie` enabled; if it's -# not enabled we need to build our dependencies with `--with-pic=yes` (see below) -echo "--- COMPILER/LINKER INFORMATION" -echo "int main() {}" > test.c -cc -Q -v test.c -echo "---" +pkgs=( + build-essential + curl + gfortran + git + libssl-dev + openssl + pkg-config +) + +apt update +apt install -y ${pkgs[@]} # install rustup curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y @@ -21,18 +27,8 @@ for version in ${RUST_V}; do rustup component add llvm-tools-preview done -# # install Fortran compiler -# apt update -# apt install gfortran -y - -# needed by the vendored OpenSSL used by `cargo-c` -yum -y install perl-IPC-Cmd - -# needed by `pineappl_applgrid` with `--features=static` -yum -y install zlib-static - # install cargo-c needed for the CAPI -cargo install --locked cargo-c --version ${CARGOC_V} --features=vendored-openssl +cargo install --locked cargo-c --version ${CARGOC_V} # remove files generated by cargo rm -r /usr/local/cargo/registry @@ -42,7 +38,7 @@ curl -L "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-${LHAPDF_V}.tar.gz" | t cd LHAPDF-${LHAPDF_V} # compile static libraries with PIC to make statically linking PineAPPL's CLI work # see also https://users.rust-lang.org/t/why-does-crelocation-model-dynamic-no-pic-help-although-it-shouldnt/109012 -./configure --disable-python --with-pic=yes +./configure --disable-python make -j V=1 make install ldconfig @@ -56,10 +52,10 @@ done # install Tanjona's polarized PDF set curl "https://data.nnpdf.science/pineappl/pdfs/240608-tr-pol-nlo-100.tar.gz" | tar xzf - -C /usr/local/share/LHAPDF -# install zlib compiled with `-fPIC` +# install zlib; we need to link against it statically curl "https://www.zlib.net/zlib-${ZLIB_V}.tar.gz" | tar xzf - cd zlib-${ZLIB_V} -CFLAGS=-fPIC ./configure --prefix=/usr/local +./configure --prefix=/usr/local make -j make install ldconfig @@ -68,8 +64,7 @@ cd .. # install APPLgrid curl -L "https://applgrid.hepforge.org/downloads?f=applgrid-${APPLGRID_V}.tgz" | tar xzf - cd applgrid-${APPLGRID_V} -# compile static libraries with PIC to make statically linking PineAPPL's CLI work -./configure --without-root --with-pic=yes +./configure --without-root make -j make install ldconfig @@ -80,8 +75,7 @@ cd .. # install fastNLO curl "https://fastnlo.hepforge.org/code/v25/fastnlo_toolkit-${FASTNLO_V}.tar.gz" | tar xzf - cd fastnlo_toolkit-${FASTNLO_V} -# compile static libraries with PIC to make statically linking PineAPPL's CLI work -./configure --prefix=/usr/local/ --with-pic=yes +./configure --prefix=/usr/local/ make -j V=1 make install ldconfig From e8e6e423da8574c77c31698a38b56db988bfc8e2 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 11:23:13 +0200 Subject: [PATCH 10/24] Update `cargo-c` --- maintainer/pineappl-ci/Containerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maintainer/pineappl-ci/Containerfile b/maintainer/pineappl-ci/Containerfile index afc8c2e5..5b317c1b 100644 --- a/maintainer/pineappl-ci/Containerfile +++ b/maintainer/pineappl-ci/Containerfile @@ -3,8 +3,8 @@ FROM debian:11-slim ARG APPLGRID_V=1.6.36 -# must be at least 0.9.16, see https://github.com/NNPDF/pineappl/pull/242#issuecomment-1705371291 -ARG CARGOC_V=0.9.24+cargo-0.73.0 +# `0.9.27+cargo-0.74.0` is the last version that support Rust 1.70 +ARG CARGOC_V=0.9.27+cargo-0.74.0 ARG FASTNLO_V=2.5.0-2826 ARG LHAPDF_V=6.5.4 ARG ZLIB_V=1.3.1 From a37ac2ce1bbe3b78780c97ecf4570ad524efa6fe Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 11:23:27 +0200 Subject: [PATCH 11/24] Use `llvm-tools` instead of `llvm-tools-preview` --- maintainer/pineappl-ci/script.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/maintainer/pineappl-ci/script.sh b/maintainer/pineappl-ci/script.sh index 7ca7977d..3eeabbee 100755 --- a/maintainer/pineappl-ci/script.sh +++ b/maintainer/pineappl-ci/script.sh @@ -23,8 +23,7 @@ for version in ${RUST_V}; do rustup install ${version} --profile minimal rustup default ${version} # install LLVM tools needed for code coverage - # this is now called `llvm-tools`, but for 1.64 it's still called `llvm-tools-preview` - rustup component add llvm-tools-preview + rustup component add llvm-tools done # install cargo-c needed for the CAPI From 02268d55f84e9d1d70fd5728ac401703c2631620 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 12:07:02 +0200 Subject: [PATCH 12/24] Remove outdated comment --- maintainer/pineappl-ci/script.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/maintainer/pineappl-ci/script.sh b/maintainer/pineappl-ci/script.sh index 3eeabbee..633d9802 100755 --- a/maintainer/pineappl-ci/script.sh +++ b/maintainer/pineappl-ci/script.sh @@ -35,8 +35,6 @@ rm -r /usr/local/cargo/registry # install LHAPDF curl -L "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-${LHAPDF_V}.tar.gz" | tar xzf - cd LHAPDF-${LHAPDF_V} -# compile static libraries with PIC to make statically linking PineAPPL's CLI work -# see also https://users.rust-lang.org/t/why-does-crelocation-model-dynamic-no-pic-help-although-it-shouldnt/109012 ./configure --disable-python make -j V=1 make install From 470658eea2ee9c0fb54b4c83510b19a9e084c471 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 12:07:30 +0200 Subject: [PATCH 13/24] Build CLI in standard container --- .github/workflows/release.yml | 44 ++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99dfe6fc..61165271 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -218,11 +218,53 @@ jobs: uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} - container: ghcr.io/nnpdf/pineappl-ci:latest # `--find-interpreter` is needed to generate wheels for *all* Python versions args: --release --out dist --find-interpreter --manifest-path pineappl_cli/Cargo.toml sccache: "true" manylinux: auto + before-script-linux: | + export APPLGRID_V=1.6.36 + export FASTNLO_V=2.5.0-2826 + export LHAPDF_V=6.5.4 + export ZLIB_V=1.3.1 + # install LHAPDF + curl -L "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-${LHAPDF_V}.tar.gz" | tar xzf - + cd LHAPDF-${LHAPDF_V} + # compile static libraries with PIC to make statically linking PineAPPL's CLI work + # see also https://users.rust-lang.org/t/why-does-crelocation-model-dynamic-no-pic-help-although-it-shouldnt/109012 + ./configure --disable-python --disable-shared --with-pic=yes + make -j V=1 + make install + ldconfig + cd .. + # install zlib; we need to link against it statically + curl "https://www.zlib.net/zlib-${ZLIB_V}.tar.gz" | tar xzf - + cd zlib-${ZLIB_V} + CFLAGS=-fPIC ./configure --static --prefix=/usr/local + make -j + make install + ldconfig + cd .. + # install APPLgrid + curl -L "https://applgrid.hepforge.org/downloads?f=applgrid-${APPLGRID_V}.tgz" | tar xzf - + cd applgrid-${APPLGRID_V} + # compile static libraries with PIC to make statically linking PineAPPL's CLI work + ./configure --without-root --disable-shared --with-pic=yes + make -j + make install + ldconfig + mkdir -p ${APPL_IGRID_DIR} + cp src/*.h ${APPL_IGRID_DIR} + cd .. + # install fastNLO + curl "https://fastnlo.hepforge.org/code/v25/fastnlo_toolkit-${FASTNLO_V}.tar.gz" | tar xzf - + cd fastnlo_toolkit-${FASTNLO_V} + # compile static libraries with PIC to make statically linking PineAPPL's CLI work + ./configure --prefix=/usr/local/ --disable-shared --with-pic=yes + make -j V=1 + make install + ldconfig + cd .. - name: Upload wheels uses: actions/upload-artifact@v4 with: From 51d16bacd63b27b94dc8dfe7e732d0abf2ae7710 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 12:08:41 +0200 Subject: [PATCH 14/24] Disable release jobs temporarily --- .github/workflows/release.yml | 764 +++++++++++++++++----------------- 1 file changed, 382 insertions(+), 382 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61165271..9f564f5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,198 +14,198 @@ env: ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true jobs: - # create a release on github - create-release: - runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" - steps: - - uses: actions/checkout@v4 - - name: Create new release - run: | - # remove leading 'v' in tag name - gh release create -d v${GITHUB_REF_NAME#v} + # # create a release on github + # create-release: + # runs-on: ubuntu-latest + # if: "startsWith(github.ref, 'refs/tags/')" + # steps: + # - uses: actions/checkout@v4 + # - name: Create new release + # run: | + # # remove leading 'v' in tag name + # gh release create -d v${GITHUB_REF_NAME#v} - capi-macos: - runs-on: macos-latest - strategy: - matrix: - target: [x86_64-apple-darwin, aarch64-apple-darwin] - steps: - - uses: actions/checkout@v4 - - name: Compile library - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target=${{ matrix.target }} - cargo install --locked cargo-c - cd pineappl_capi - cargo cinstall --destdir=prefix --library-type=cdylib --locked --prefix=/ --target=${{ matrix.target }} --verbose - cd prefix - tar czf ../../pineappl_capi-${{ matrix.target }}.tar.gz . - - name: Upload artifact - # as long as we need v3 in `capi-linux` we also must use it here - uses: actions/upload-artifact@v3 - with: - name: pineappl_capi-${{ matrix.target }} - path: pineappl_capi-${{ matrix.target }}.tar.gz + # capi-macos: + # runs-on: macos-latest + # strategy: + # matrix: + # target: [x86_64-apple-darwin, aarch64-apple-darwin] + # steps: + # - uses: actions/checkout@v4 + # - name: Compile library + # run: | + # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target=${{ matrix.target }} + # cargo install --locked cargo-c + # cd pineappl_capi + # cargo cinstall --destdir=prefix --library-type=cdylib --locked --prefix=/ --target=${{ matrix.target }} --verbose + # cd prefix + # tar czf ../../pineappl_capi-${{ matrix.target }}.tar.gz . + # - name: Upload artifact + # # as long as we need v3 in `capi-linux` we also must use it here + # uses: actions/upload-artifact@v3 + # with: + # name: pineappl_capi-${{ matrix.target }} + # path: pineappl_capi-${{ matrix.target }}.tar.gz - cli-macos: - strategy: - matrix: - include: - - os: macos-13 - target: x86_64-apple-darwin - - os: macos-14 - # we cannot cross-compile, because we need also all dependencies for the specified target - target: aarch64-apple-darwin - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Compile binary - run: | - brew tap davidchall/hep - # install LHAPDF - brew install lhapdf - # install APPLgrid's dependencies; disable ROOT because its static libraries are missing - brew install --only-dependencies --without-hoppet --without-lhapdf --without-root applgrid - # install zlib, which is a dependency of APPLgrid but somehow missing - brew install zlib - # APPLgrid wants to be linked against zlib, and we need to find its static library via pkg-config - export PKG_CONFIG_PATH=$(find $(brew --cellar) -name '*.pc' -exec dirname {} + | sort -u | tr '\n' ':') - # manually compile APPLgrid, because we need the file `appl_igrid.h` and the files it includes, which are possibly generated - export HOMEBREW_TEMP="$(pwd)"/tmp - mkdir -p ${HOMEBREW_TEMP} - brew install --build-from-source --keep-tmp --without-hoppet --without-lhapdf --without-root applgrid - export APPL_IGRID_DIR=$(find ${HOMEBREW_TEMP} -name appl_igrid.h -exec dirname {} +) - # do not link against `gfortran` - sed 's/-lgfortran//g' $(command -v applgrid-config) > applgrid-config.new - mv applgrid-config.new $(command -v applgrid-config) - chmod +x $(command -v applgrid-config) - # install fastNLO - brew install --without-fastjet fastnlo - # install Rust - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-host=${{ matrix.target }} - # build the CLI - cargo install --all-features --locked --path pineappl_cli --root=prefix --target=${{ matrix.target }} - # build manpages - mkdir -p prefix/share/man/man1 - cargo xtask install-manpages prefix/share/man/man1 - cd prefix - tar czf ../pineappl_cli-${{ matrix.target }}.tar.gz . - - name: Upload artifact - # as long as we need v3 in `cli-linux` we also must use it here - uses: actions/upload-artifact@v3 - with: - name: pineappl_cli-${{ matrix.target }} - path: pineappl_cli-${{ matrix.target }}.tar.gz + # cli-macos: + # strategy: + # matrix: + # include: + # - os: macos-13 + # target: x86_64-apple-darwin + # - os: macos-14 + # # we cannot cross-compile, because we need also all dependencies for the specified target + # target: aarch64-apple-darwin + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v4 + # - name: Compile binary + # run: | + # brew tap davidchall/hep + # # install LHAPDF + # brew install lhapdf + # # install APPLgrid's dependencies; disable ROOT because its static libraries are missing + # brew install --only-dependencies --without-hoppet --without-lhapdf --without-root applgrid + # # install zlib, which is a dependency of APPLgrid but somehow missing + # brew install zlib + # # APPLgrid wants to be linked against zlib, and we need to find its static library via pkg-config + # export PKG_CONFIG_PATH=$(find $(brew --cellar) -name '*.pc' -exec dirname {} + | sort -u | tr '\n' ':') + # # manually compile APPLgrid, because we need the file `appl_igrid.h` and the files it includes, which are possibly generated + # export HOMEBREW_TEMP="$(pwd)"/tmp + # mkdir -p ${HOMEBREW_TEMP} + # brew install --build-from-source --keep-tmp --without-hoppet --without-lhapdf --without-root applgrid + # export APPL_IGRID_DIR=$(find ${HOMEBREW_TEMP} -name appl_igrid.h -exec dirname {} +) + # # do not link against `gfortran` + # sed 's/-lgfortran//g' $(command -v applgrid-config) > applgrid-config.new + # mv applgrid-config.new $(command -v applgrid-config) + # chmod +x $(command -v applgrid-config) + # # install fastNLO + # brew install --without-fastjet fastnlo + # # install Rust + # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-host=${{ matrix.target }} + # # build the CLI + # cargo install --all-features --locked --path pineappl_cli --root=prefix --target=${{ matrix.target }} + # # build manpages + # mkdir -p prefix/share/man/man1 + # cargo xtask install-manpages prefix/share/man/man1 + # cd prefix + # tar czf ../pineappl_cli-${{ matrix.target }}.tar.gz . + # - name: Upload artifact + # # as long as we need v3 in `cli-linux` we also must use it here + # uses: actions/upload-artifact@v3 + # with: + # name: pineappl_cli-${{ matrix.target }} + # path: pineappl_cli-${{ matrix.target }}.tar.gz - cli-wheels-macos: - strategy: - matrix: - include: - - os: macos-13 - target: x86_64 - - os: macos-14 - # we cannot cross-compile, because we need also all dependencies for the specified target - target: aarch64 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - # WARNING: be careful with the ordering - the last version is the - # default one. Apparently maturin doesn't find all Python versions - # when one chooses a PyPy version instead of CPython as default - python-version: | - pypy3.8 - pypy3.9 - pypy3.10 - 3.8 - 3.9 - 3.11 - 3.12 - 3.10 - - name: Install dependencies - run: | - brew tap davidchall/hep - # install LHAPDF - brew install lhapdf - # install APPLgrid's dependencies; disable ROOT because its static libraries are missing - brew install --only-dependencies --without-hoppet --without-lhapdf --without-root applgrid - # install zlib, which is a dependency of APPLgrid but somehow missing - brew install zlib - # APPLgrid wants to be linked against zlib, and we need to find its static library via pkg-config - echo "PKG_CONFIG_PATH=$(find $(brew --cellar) -name '*.pc' -exec dirname {} + | sort -u | tr '\n' ':')" >> ${GITHUB_ENV} - # manually compile APPLgrid, because we need the file `appl_igrid.h` and the files it includes, which are possibly generated - export HOMEBREW_TEMP="$(pwd)"/tmp - mkdir -p ${HOMEBREW_TEMP} - brew install --build-from-source --keep-tmp --without-hoppet --without-lhapdf --without-root applgrid - echo "APPL_IGRID_DIR=$(find ${HOMEBREW_TEMP} -name appl_igrid.h -exec dirname {} +)" >> ${GITHUB_ENV} - # do not link against `gfortran` - sed 's/-lgfortran//g' $(command -v applgrid-config) > applgrid-config.new - mv applgrid-config.new $(command -v applgrid-config) - chmod +x $(command -v applgrid-config) - # install fastNLO - brew install --without-fastjet fastnlo - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter --manifest-path pineappl_cli/Cargo.toml - sccache: "true" - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: ${{ github.job }}-${{ matrix.target }} - path: dist + # cli-wheels-macos: + # strategy: + # matrix: + # include: + # - os: macos-13 + # target: x86_64 + # - os: macos-14 + # # we cannot cross-compile, because we need also all dependencies for the specified target + # target: aarch64 + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 + # with: + # # WARNING: be careful with the ordering - the last version is the + # # default one. Apparently maturin doesn't find all Python versions + # # when one chooses a PyPy version instead of CPython as default + # python-version: | + # pypy3.8 + # pypy3.9 + # pypy3.10 + # 3.8 + # 3.9 + # 3.11 + # 3.12 + # 3.10 + # - name: Install dependencies + # run: | + # brew tap davidchall/hep + # # install LHAPDF + # brew install lhapdf + # # install APPLgrid's dependencies; disable ROOT because its static libraries are missing + # brew install --only-dependencies --without-hoppet --without-lhapdf --without-root applgrid + # # install zlib, which is a dependency of APPLgrid but somehow missing + # brew install zlib + # # APPLgrid wants to be linked against zlib, and we need to find its static library via pkg-config + # echo "PKG_CONFIG_PATH=$(find $(brew --cellar) -name '*.pc' -exec dirname {} + | sort -u | tr '\n' ':')" >> ${GITHUB_ENV} + # # manually compile APPLgrid, because we need the file `appl_igrid.h` and the files it includes, which are possibly generated + # export HOMEBREW_TEMP="$(pwd)"/tmp + # mkdir -p ${HOMEBREW_TEMP} + # brew install --build-from-source --keep-tmp --without-hoppet --without-lhapdf --without-root applgrid + # echo "APPL_IGRID_DIR=$(find ${HOMEBREW_TEMP} -name appl_igrid.h -exec dirname {} +)" >> ${GITHUB_ENV} + # # do not link against `gfortran` + # sed 's/-lgfortran//g' $(command -v applgrid-config) > applgrid-config.new + # mv applgrid-config.new $(command -v applgrid-config) + # chmod +x $(command -v applgrid-config) + # # install fastNLO + # brew install --without-fastjet fastnlo + # - name: Build wheels + # uses: PyO3/maturin-action@v1 + # with: + # target: ${{ matrix.target }} + # args: --release --out dist --find-interpreter --manifest-path pineappl_cli/Cargo.toml + # sccache: "true" + # - name: Upload wheels + # uses: actions/upload-artifact@v4 + # with: + # name: ${{ github.job }}-${{ matrix.target }} + # path: dist - capi-linux: - runs-on: ubuntu-latest - container: ghcr.io/nnpdf/pineappl-ci:latest - strategy: - matrix: - target: [x86_64-unknown-linux-gnu] - steps: - # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - - uses: actions/checkout@v3 - - name: Compile library - run: | - cd pineappl_capi - cargo cinstall --destdir=prefix --library-type=cdylib --locked --prefix=/ --target=${{ matrix.target }} --verbose - cd prefix - tar czf ../../pineappl_capi-${{ matrix.target }}.tar.gz . - # print the glibc version requirement - objdump -T lib/libpineappl_capi.so | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu | tail -1 - - name: Upload artifact - # upload-artifact@v4 uses a newer version of Node that's incompatible with our container's GLIBC - uses: actions/upload-artifact@v3 - with: - name: pineappl_capi-${{ matrix.target }} - path: pineappl_capi-${{ matrix.target }}.tar.gz + # capi-linux: + # runs-on: ubuntu-latest + # container: ghcr.io/nnpdf/pineappl-ci:latest + # strategy: + # matrix: + # target: [x86_64-unknown-linux-gnu] + # steps: + # # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC + # - uses: actions/checkout@v3 + # - name: Compile library + # run: | + # cd pineappl_capi + # cargo cinstall --destdir=prefix --library-type=cdylib --locked --prefix=/ --target=${{ matrix.target }} --verbose + # cd prefix + # tar czf ../../pineappl_capi-${{ matrix.target }}.tar.gz . + # # print the glibc version requirement + # objdump -T lib/libpineappl_capi.so | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu | tail -1 + # - name: Upload artifact + # # upload-artifact@v4 uses a newer version of Node that's incompatible with our container's GLIBC + # uses: actions/upload-artifact@v3 + # with: + # name: pineappl_capi-${{ matrix.target }} + # path: pineappl_capi-${{ matrix.target }}.tar.gz - cli-linux: - runs-on: ubuntu-latest - container: ghcr.io/nnpdf/pineappl-ci:latest - strategy: - matrix: - target: [x86_64-unknown-linux-gnu] - steps: - # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - - uses: actions/checkout@v3 - - name: Compile binary - run: | - cargo install --all-features --locked --path pineappl_cli --root=prefix --target=${{ matrix.target }} -vv - # build manpages - mkdir -p prefix/share/man/man1 - cargo xtask install-manpages prefix/share/man/man1 - cd prefix - tar czf ../pineappl_cli-${{ matrix.target }}.tar.gz . - # print the dynamically linked libraries - ldd bin/pineappl - - name: Upload artifact - # upload-artifact@v4 uses a newer version of Node that's incompatible with our container's GLIBC - uses: actions/upload-artifact@v3 - with: - name: pineappl_cli-${{ matrix.target }} - path: pineappl_cli-${{ matrix.target }}.tar.gz + # cli-linux: + # runs-on: ubuntu-latest + # container: ghcr.io/nnpdf/pineappl-ci:latest + # strategy: + # matrix: + # target: [x86_64-unknown-linux-gnu] + # steps: + # # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC + # - uses: actions/checkout@v3 + # - name: Compile binary + # run: | + # cargo install --all-features --locked --path pineappl_cli --root=prefix --target=${{ matrix.target }} -vv + # # build manpages + # mkdir -p prefix/share/man/man1 + # cargo xtask install-manpages prefix/share/man/man1 + # cd prefix + # tar czf ../pineappl_cli-${{ matrix.target }}.tar.gz . + # # print the dynamically linked libraries + # ldd bin/pineappl + # - name: Upload artifact + # # upload-artifact@v4 uses a newer version of Node that's incompatible with our container's GLIBC + # uses: actions/upload-artifact@v3 + # with: + # name: pineappl_cli-${{ matrix.target }} + # path: pineappl_cli-${{ matrix.target }}.tar.gz cli-wheels-linux: runs-on: ubuntu-latest @@ -271,206 +271,206 @@ jobs: name: ${{ github.job }}-${{ matrix.target }} path: dist - # publish a release on github and upload pre-built CAPI - publish-release: - needs: [capi-macos, cli-macos, capi-linux, cli-linux] - runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" - steps: - - uses: actions/checkout@v4 - # version must match the one used in `actions/upload-artifact` - - uses: actions/download-artifact@v3 - with: - path: artifacts - - name: Create new release - run: | - # remove leading 'v' in tag name - version=${GITHUB_REF_NAME#v} - prerelease=$(echo ${version} | perl -pe 's/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/\4/') - if [[ ${prerelease} == "" ]]; then - # extract the previous version number - old_version=$(sed -n 's/^## \[\(.*\)\] - .*/\1/p' CHANGELOG.md | tail +2 | head -n 1) - # extract news for the current version from the changelog file, dismissing - # empty lines at the start and the end - news=$(sed -n "/\\[${version}\\]/, /\\[${old_version}\\]/{ /\\[${old_version}\\]/! p }" \ - CHANGELOG.md | sed -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba') - gh release edit v${version} -n "${news}" - else - gh release edit v${version} -n "" --prerelease - fi - find artifacts -name 'pineappl*' -type f -exec gh release upload v${version} {} + - gh release edit v${version} --draft=false + # # publish a release on github and upload pre-built CAPI + # publish-release: + # needs: [capi-macos, cli-macos, capi-linux, cli-linux] + # runs-on: ubuntu-latest + # if: "startsWith(github.ref, 'refs/tags/')" + # steps: + # - uses: actions/checkout@v4 + # # version must match the one used in `actions/upload-artifact` + # - uses: actions/download-artifact@v3 + # with: + # path: artifacts + # - name: Create new release + # run: | + # # remove leading 'v' in tag name + # version=${GITHUB_REF_NAME#v} + # prerelease=$(echo ${version} | perl -pe 's/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/\4/') + # if [[ ${prerelease} == "" ]]; then + # # extract the previous version number + # old_version=$(sed -n 's/^## \[\(.*\)\] - .*/\1/p' CHANGELOG.md | tail +2 | head -n 1) + # # extract news for the current version from the changelog file, dismissing + # # empty lines at the start and the end + # news=$(sed -n "/\\[${version}\\]/, /\\[${old_version}\\]/{ /\\[${old_version}\\]/! p }" \ + # CHANGELOG.md | sed -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba') + # gh release edit v${version} -n "${news}" + # else + # gh release edit v${version} -n "" --prerelease + # fi + # find artifacts -name 'pineappl*' -type f -exec gh release upload v${version} {} + + # gh release edit v${version} --draft=false - publish-crates: - runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" - container: ghcr.io/nnpdf/pineappl-ci:latest - steps: - # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - - uses: actions/checkout@v3 + # publish-crates: + # runs-on: ubuntu-latest + # if: "startsWith(github.ref, 'refs/tags/')" + # container: ghcr.io/nnpdf/pineappl-ci:latest + # steps: + # # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC + # - uses: actions/checkout@v3 - - name: Publish all crates - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - run: | - # this must be at least Rust 1.66 to support waiting for dependencies to on crates.io: - # https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-166-2022-12-15 - rustup default stable - cd pineappl - cargo publish - cd ../pineappl_applgrid - cargo publish - cd ../pineappl_fastnlo - cargo publish - cd ../pineappl_capi - cargo publish - cd ../pineappl_cli - cargo publish + # - name: Publish all crates + # env: + # CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + # run: | + # # this must be at least Rust 1.66 to support waiting for dependencies to on crates.io: + # # https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-166-2022-12-15 + # rustup default stable + # cd pineappl + # cargo publish + # cd ../pineappl_applgrid + # cargo publish + # cd ../pineappl_fastnlo + # cargo publish + # cd ../pineappl_capi + # cargo publish + # cd ../pineappl_cli + # cargo publish - wheels-linux: - runs-on: ubuntu-latest - strategy: - matrix: - target: [x86_64] - steps: - - uses: actions/checkout@v4 - # for Linux the wheels are built in a container, so we don't need the `setup-python` action - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - # `--find-interpreter` is needed to generate wheels for *all* Python versions - args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml - sccache: 'true' - manylinux: auto - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: ${{ github.job }}-${{ matrix.target }} - path: dist + # wheels-linux: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # target: [x86_64] + # steps: + # - uses: actions/checkout@v4 + # # for Linux the wheels are built in a container, so we don't need the `setup-python` action + # - name: Build wheels + # uses: PyO3/maturin-action@v1 + # with: + # target: ${{ matrix.target }} + # # `--find-interpreter` is needed to generate wheels for *all* Python versions + # args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml + # sccache: 'true' + # manylinux: auto + # - name: Upload wheels + # uses: actions/upload-artifact@v4 + # with: + # name: ${{ github.job }}-${{ matrix.target }} + # path: dist - wheels-macos: - runs-on: macos-13 - strategy: - matrix: - target: [aarch64, x86_64] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - # WARNING: be careful with the ordering - the last version is the default one. Apparently - # maturin doesn't find all Python versions when one chooses a PyPy version instead of - # CPython as default - python-version: | - pypy3.7 - pypy3.8 - pypy3.9 - pypy3.10 - 3.7 - 3.8 - 3.9 - 3.11 - 3.12 - 3.10 - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml - sccache: 'true' - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: ${{ github.job }}-${{ matrix.target }} - path: dist + # wheels-macos: + # runs-on: macos-13 + # strategy: + # matrix: + # target: [aarch64, x86_64] + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 + # with: + # # WARNING: be careful with the ordering - the last version is the default one. Apparently + # # maturin doesn't find all Python versions when one chooses a PyPy version instead of + # # CPython as default + # python-version: | + # pypy3.7 + # pypy3.8 + # pypy3.9 + # pypy3.10 + # 3.7 + # 3.8 + # 3.9 + # 3.11 + # 3.12 + # 3.10 + # - name: Build wheels + # uses: PyO3/maturin-action@v1 + # with: + # target: ${{ matrix.target }} + # args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml + # sccache: 'true' + # - name: Upload wheels + # uses: actions/upload-artifact@v4 + # with: + # name: ${{ github.job }}-${{ matrix.target }} + # path: dist - wheels-sdist: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Build sdist - uses: PyO3/maturin-action@v1 - with: - command: sdist - args: --out dist --manifest-path pineappl_py/Cargo.toml - - name: Upload sdist - uses: actions/upload-artifact@v4 - with: - name: ${{ github.job }} - path: dist + # wheels-sdist: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - name: Build sdist + # uses: PyO3/maturin-action@v1 + # with: + # command: sdist + # args: --out dist --manifest-path pineappl_py/Cargo.toml + # - name: Upload sdist + # uses: actions/upload-artifact@v4 + # with: + # name: ${{ github.job }} + # path: dist - wheels-windows: - runs-on: windows-latest - strategy: - matrix: - target: [x64] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - # WARNING: be careful with the ordering - the last version is the default one. Apparently - # maturin doesn't find all Python versions when one chooses a PyPy version instead of - # CPython as default - python-version: | - pypy3.7 - pypy3.8 - pypy3.9 - pypy3.10 - 3.7 - 3.8 - 3.9 - 3.11 - 3.12 - 3.10 - architecture: ${{ matrix.target }} - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml - sccache: 'true' - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: ${{ github.job }}-${{ matrix.target }} - path: dist + # wheels-windows: + # runs-on: windows-latest + # strategy: + # matrix: + # target: [x64] + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 + # with: + # # WARNING: be careful with the ordering - the last version is the default one. Apparently + # # maturin doesn't find all Python versions when one chooses a PyPy version instead of + # # CPython as default + # python-version: | + # pypy3.7 + # pypy3.8 + # pypy3.9 + # pypy3.10 + # 3.7 + # 3.8 + # 3.9 + # 3.11 + # 3.12 + # 3.10 + # architecture: ${{ matrix.target }} + # - name: Build wheels + # uses: PyO3/maturin-action@v1 + # with: + # target: ${{ matrix.target }} + # args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml + # sccache: 'true' + # - name: Upload wheels + # uses: actions/upload-artifact@v4 + # with: + # name: ${{ github.job }}-${{ matrix.target }} + # path: dist - release-cli-wheels: - runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" - needs: - - cli-wheels-linux - - cli-wheels-macos - steps: - - uses: actions/download-artifact@v4 - with: - pattern: "cli-wheels-*" - merge-multiple: true - - name: Publish to PyPI - uses: PyO3/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_CLI }} - with: - command: upload - args: --skip-existing * + # release-cli-wheels: + # runs-on: ubuntu-latest + # if: "startsWith(github.ref, 'refs/tags/')" + # needs: + # - cli-wheels-linux + # - cli-wheels-macos + # steps: + # - uses: actions/download-artifact@v4 + # with: + # pattern: "cli-wheels-*" + # merge-multiple: true + # - name: Publish to PyPI + # uses: PyO3/maturin-action@v1 + # env: + # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_CLI }} + # with: + # command: upload + # args: --skip-existing * - release-wheels: - runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" - needs: - - wheels-linux - - wheels-macos - - wheels-sdist - - wheels-windows - steps: - - uses: actions/download-artifact@v4 - with: - pattern: "wheels-*" - merge-multiple: true - - name: Publish to PyPI - uses: PyO3/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - with: - command: upload - args: --skip-existing * + # release-wheels: + # runs-on: ubuntu-latest + # if: "startsWith(github.ref, 'refs/tags/')" + # needs: + # - wheels-linux + # - wheels-macos + # - wheels-sdist + # - wheels-windows + # steps: + # - uses: actions/download-artifact@v4 + # with: + # pattern: "wheels-*" + # merge-multiple: true + # - name: Publish to PyPI + # uses: PyO3/maturin-action@v1 + # env: + # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + # with: + # command: upload + # args: --skip-existing * From 9ce3e87a6720380112f39ca07e10e72e1da8e251 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 12:31:49 +0200 Subject: [PATCH 15/24] Patch APPLgrid to avoid linking error --- .github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f564f5c..cb7f6f3d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -248,6 +248,23 @@ jobs: # install APPLgrid curl -L "https://applgrid.hepforge.org/downloads?f=applgrid-${APPLGRID_V}.tgz" | tar xzf - cd applgrid-${APPLGRID_V} + patch -p0 <GetNbinsX() ; i++ ) d += h->GetBinContent(i+1); +- return d; +-} +- + + void print( appl::TH1D* h ) { + for ( int i=1 ; i<=h->GetNbinsX() ; i++ ) std::cout << h->GetBinContent(i) << " "; +EOF # compile static libraries with PIC to make statically linking PineAPPL's CLI work ./configure --without-root --disable-shared --with-pic=yes make -j From 5989054082884df9157cfe0588b85014ed6022aa Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 12:33:40 +0200 Subject: [PATCH 16/24] Fix indentation --- .github/workflows/release.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cb7f6f3d..98507f81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -249,22 +249,22 @@ jobs: curl -L "https://applgrid.hepforge.org/downloads?f=applgrid-${APPLGRID_V}.tgz" | tar xzf - cd applgrid-${APPLGRID_V} patch -p0 <GetNbinsX() ; i++ ) d += h->GetBinContent(i+1); -- return d; --} -- - - void print( appl::TH1D* h ) { - for ( int i=1 ; i<=h->GetNbinsX() ; i++ ) std::cout << h->GetBinContent(i) << " "; -EOF + --- src/combine.cxx 2024-04-23 16:35:27.000000000 +0200 + +++ src/combine.cxx.new 2024-07-06 12:29:12.813303074 +0200 + @@ -56,12 +56,6 @@ + } + + + -double integral( appl::TH1D* h ) { + - double d = 0; + - for ( int i=0 ; iGetNbinsX() ; i++ ) d += h->GetBinContent(i+1); + - return d; + -} + - + + void print( appl::TH1D* h ) { + for ( int i=1 ; i<=h->GetNbinsX() ; i++ ) std::cout << h->GetBinContent(i) << " "; + EOF # compile static libraries with PIC to make statically linking PineAPPL's CLI work ./configure --without-root --disable-shared --with-pic=yes make -j From 7653de931b7d2a8f534b59233e8b04d9f2e5ff83 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 12:43:49 +0200 Subject: [PATCH 17/24] Add missing variable --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 98507f81..82053856 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -227,6 +227,7 @@ jobs: export FASTNLO_V=2.5.0-2826 export LHAPDF_V=6.5.4 export ZLIB_V=1.3.1 + export APPL_IGRID_DIR="/usr/local/src/applgrid-${APPLGRID_V}/src" # install LHAPDF curl -L "https://lhapdf.hepforge.org/downloads/?f=LHAPDF-${LHAPDF_V}.tar.gz" | tar xzf - cd LHAPDF-${LHAPDF_V} From d9e11aba8dfe67f2c6c9a64d82e78177d853599a Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 13:00:47 +0200 Subject: [PATCH 18/24] Uncomment release jobs --- .github/workflows/release.yml | 764 +++++++++++++++++----------------- 1 file changed, 382 insertions(+), 382 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 82053856..096afaa7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,198 +14,198 @@ env: ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true jobs: - # # create a release on github - # create-release: - # runs-on: ubuntu-latest - # if: "startsWith(github.ref, 'refs/tags/')" - # steps: - # - uses: actions/checkout@v4 - # - name: Create new release - # run: | - # # remove leading 'v' in tag name - # gh release create -d v${GITHUB_REF_NAME#v} + # create a release on github + create-release: + runs-on: ubuntu-latest + if: "startsWith(github.ref, 'refs/tags/')" + steps: + - uses: actions/checkout@v4 + - name: Create new release + run: | + # remove leading 'v' in tag name + gh release create -d v${GITHUB_REF_NAME#v} - # capi-macos: - # runs-on: macos-latest - # strategy: - # matrix: - # target: [x86_64-apple-darwin, aarch64-apple-darwin] - # steps: - # - uses: actions/checkout@v4 - # - name: Compile library - # run: | - # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target=${{ matrix.target }} - # cargo install --locked cargo-c - # cd pineappl_capi - # cargo cinstall --destdir=prefix --library-type=cdylib --locked --prefix=/ --target=${{ matrix.target }} --verbose - # cd prefix - # tar czf ../../pineappl_capi-${{ matrix.target }}.tar.gz . - # - name: Upload artifact - # # as long as we need v3 in `capi-linux` we also must use it here - # uses: actions/upload-artifact@v3 - # with: - # name: pineappl_capi-${{ matrix.target }} - # path: pineappl_capi-${{ matrix.target }}.tar.gz + capi-macos: + runs-on: macos-latest + strategy: + matrix: + target: [x86_64-apple-darwin, aarch64-apple-darwin] + steps: + - uses: actions/checkout@v4 + - name: Compile library + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --target=${{ matrix.target }} + cargo install --locked cargo-c + cd pineappl_capi + cargo cinstall --destdir=prefix --library-type=cdylib --locked --prefix=/ --target=${{ matrix.target }} --verbose + cd prefix + tar czf ../../pineappl_capi-${{ matrix.target }}.tar.gz . + - name: Upload artifact + # as long as we need v3 in `capi-linux` we also must use it here + uses: actions/upload-artifact@v3 + with: + name: pineappl_capi-${{ matrix.target }} + path: pineappl_capi-${{ matrix.target }}.tar.gz - # cli-macos: - # strategy: - # matrix: - # include: - # - os: macos-13 - # target: x86_64-apple-darwin - # - os: macos-14 - # # we cannot cross-compile, because we need also all dependencies for the specified target - # target: aarch64-apple-darwin - # runs-on: ${{ matrix.os }} - # steps: - # - uses: actions/checkout@v4 - # - name: Compile binary - # run: | - # brew tap davidchall/hep - # # install LHAPDF - # brew install lhapdf - # # install APPLgrid's dependencies; disable ROOT because its static libraries are missing - # brew install --only-dependencies --without-hoppet --without-lhapdf --without-root applgrid - # # install zlib, which is a dependency of APPLgrid but somehow missing - # brew install zlib - # # APPLgrid wants to be linked against zlib, and we need to find its static library via pkg-config - # export PKG_CONFIG_PATH=$(find $(brew --cellar) -name '*.pc' -exec dirname {} + | sort -u | tr '\n' ':') - # # manually compile APPLgrid, because we need the file `appl_igrid.h` and the files it includes, which are possibly generated - # export HOMEBREW_TEMP="$(pwd)"/tmp - # mkdir -p ${HOMEBREW_TEMP} - # brew install --build-from-source --keep-tmp --without-hoppet --without-lhapdf --without-root applgrid - # export APPL_IGRID_DIR=$(find ${HOMEBREW_TEMP} -name appl_igrid.h -exec dirname {} +) - # # do not link against `gfortran` - # sed 's/-lgfortran//g' $(command -v applgrid-config) > applgrid-config.new - # mv applgrid-config.new $(command -v applgrid-config) - # chmod +x $(command -v applgrid-config) - # # install fastNLO - # brew install --without-fastjet fastnlo - # # install Rust - # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-host=${{ matrix.target }} - # # build the CLI - # cargo install --all-features --locked --path pineappl_cli --root=prefix --target=${{ matrix.target }} - # # build manpages - # mkdir -p prefix/share/man/man1 - # cargo xtask install-manpages prefix/share/man/man1 - # cd prefix - # tar czf ../pineappl_cli-${{ matrix.target }}.tar.gz . - # - name: Upload artifact - # # as long as we need v3 in `cli-linux` we also must use it here - # uses: actions/upload-artifact@v3 - # with: - # name: pineappl_cli-${{ matrix.target }} - # path: pineappl_cli-${{ matrix.target }}.tar.gz + cli-macos: + strategy: + matrix: + include: + - os: macos-13 + target: x86_64-apple-darwin + - os: macos-14 + # we cannot cross-compile, because we need also all dependencies for the specified target + target: aarch64-apple-darwin + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Compile binary + run: | + brew tap davidchall/hep + # install LHAPDF + brew install lhapdf + # install APPLgrid's dependencies; disable ROOT because its static libraries are missing + brew install --only-dependencies --without-hoppet --without-lhapdf --without-root applgrid + # install zlib, which is a dependency of APPLgrid but somehow missing + brew install zlib + # APPLgrid wants to be linked against zlib, and we need to find its static library via pkg-config + export PKG_CONFIG_PATH=$(find $(brew --cellar) -name '*.pc' -exec dirname {} + | sort -u | tr '\n' ':') + # manually compile APPLgrid, because we need the file `appl_igrid.h` and the files it includes, which are possibly generated + export HOMEBREW_TEMP="$(pwd)"/tmp + mkdir -p ${HOMEBREW_TEMP} + brew install --build-from-source --keep-tmp --without-hoppet --without-lhapdf --without-root applgrid + export APPL_IGRID_DIR=$(find ${HOMEBREW_TEMP} -name appl_igrid.h -exec dirname {} +) + # do not link against `gfortran` + sed 's/-lgfortran//g' $(command -v applgrid-config) > applgrid-config.new + mv applgrid-config.new $(command -v applgrid-config) + chmod +x $(command -v applgrid-config) + # install fastNLO + brew install --without-fastjet fastnlo + # install Rust + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-host=${{ matrix.target }} + # build the CLI + cargo install --all-features --locked --path pineappl_cli --root=prefix --target=${{ matrix.target }} + # build manpages + mkdir -p prefix/share/man/man1 + cargo xtask install-manpages prefix/share/man/man1 + cd prefix + tar czf ../pineappl_cli-${{ matrix.target }}.tar.gz . + - name: Upload artifact + # as long as we need v3 in `cli-linux` we also must use it here + uses: actions/upload-artifact@v3 + with: + name: pineappl_cli-${{ matrix.target }} + path: pineappl_cli-${{ matrix.target }}.tar.gz - # cli-wheels-macos: - # strategy: - # matrix: - # include: - # - os: macos-13 - # target: x86_64 - # - os: macos-14 - # # we cannot cross-compile, because we need also all dependencies for the specified target - # target: aarch64 - # runs-on: ${{ matrix.os }} - # steps: - # - uses: actions/checkout@v4 - # - uses: actions/setup-python@v5 - # with: - # # WARNING: be careful with the ordering - the last version is the - # # default one. Apparently maturin doesn't find all Python versions - # # when one chooses a PyPy version instead of CPython as default - # python-version: | - # pypy3.8 - # pypy3.9 - # pypy3.10 - # 3.8 - # 3.9 - # 3.11 - # 3.12 - # 3.10 - # - name: Install dependencies - # run: | - # brew tap davidchall/hep - # # install LHAPDF - # brew install lhapdf - # # install APPLgrid's dependencies; disable ROOT because its static libraries are missing - # brew install --only-dependencies --without-hoppet --without-lhapdf --without-root applgrid - # # install zlib, which is a dependency of APPLgrid but somehow missing - # brew install zlib - # # APPLgrid wants to be linked against zlib, and we need to find its static library via pkg-config - # echo "PKG_CONFIG_PATH=$(find $(brew --cellar) -name '*.pc' -exec dirname {} + | sort -u | tr '\n' ':')" >> ${GITHUB_ENV} - # # manually compile APPLgrid, because we need the file `appl_igrid.h` and the files it includes, which are possibly generated - # export HOMEBREW_TEMP="$(pwd)"/tmp - # mkdir -p ${HOMEBREW_TEMP} - # brew install --build-from-source --keep-tmp --without-hoppet --without-lhapdf --without-root applgrid - # echo "APPL_IGRID_DIR=$(find ${HOMEBREW_TEMP} -name appl_igrid.h -exec dirname {} +)" >> ${GITHUB_ENV} - # # do not link against `gfortran` - # sed 's/-lgfortran//g' $(command -v applgrid-config) > applgrid-config.new - # mv applgrid-config.new $(command -v applgrid-config) - # chmod +x $(command -v applgrid-config) - # # install fastNLO - # brew install --without-fastjet fastnlo - # - name: Build wheels - # uses: PyO3/maturin-action@v1 - # with: - # target: ${{ matrix.target }} - # args: --release --out dist --find-interpreter --manifest-path pineappl_cli/Cargo.toml - # sccache: "true" - # - name: Upload wheels - # uses: actions/upload-artifact@v4 - # with: - # name: ${{ github.job }}-${{ matrix.target }} - # path: dist + cli-wheels-macos: + strategy: + matrix: + include: + - os: macos-13 + target: x86_64 + - os: macos-14 + # we cannot cross-compile, because we need also all dependencies for the specified target + target: aarch64 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + # WARNING: be careful with the ordering - the last version is the + # default one. Apparently maturin doesn't find all Python versions + # when one chooses a PyPy version instead of CPython as default + python-version: | + pypy3.8 + pypy3.9 + pypy3.10 + 3.8 + 3.9 + 3.11 + 3.12 + 3.10 + - name: Install dependencies + run: | + brew tap davidchall/hep + # install LHAPDF + brew install lhapdf + # install APPLgrid's dependencies; disable ROOT because its static libraries are missing + brew install --only-dependencies --without-hoppet --without-lhapdf --without-root applgrid + # install zlib, which is a dependency of APPLgrid but somehow missing + brew install zlib + # APPLgrid wants to be linked against zlib, and we need to find its static library via pkg-config + echo "PKG_CONFIG_PATH=$(find $(brew --cellar) -name '*.pc' -exec dirname {} + | sort -u | tr '\n' ':')" >> ${GITHUB_ENV} + # manually compile APPLgrid, because we need the file `appl_igrid.h` and the files it includes, which are possibly generated + export HOMEBREW_TEMP="$(pwd)"/tmp + mkdir -p ${HOMEBREW_TEMP} + brew install --build-from-source --keep-tmp --without-hoppet --without-lhapdf --without-root applgrid + echo "APPL_IGRID_DIR=$(find ${HOMEBREW_TEMP} -name appl_igrid.h -exec dirname {} +)" >> ${GITHUB_ENV} + # do not link against `gfortran` + sed 's/-lgfortran//g' $(command -v applgrid-config) > applgrid-config.new + mv applgrid-config.new $(command -v applgrid-config) + chmod +x $(command -v applgrid-config) + # install fastNLO + brew install --without-fastjet fastnlo + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter --manifest-path pineappl_cli/Cargo.toml + sccache: "true" + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: ${{ github.job }}-${{ matrix.target }} + path: dist - # capi-linux: - # runs-on: ubuntu-latest - # container: ghcr.io/nnpdf/pineappl-ci:latest - # strategy: - # matrix: - # target: [x86_64-unknown-linux-gnu] - # steps: - # # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - # - uses: actions/checkout@v3 - # - name: Compile library - # run: | - # cd pineappl_capi - # cargo cinstall --destdir=prefix --library-type=cdylib --locked --prefix=/ --target=${{ matrix.target }} --verbose - # cd prefix - # tar czf ../../pineappl_capi-${{ matrix.target }}.tar.gz . - # # print the glibc version requirement - # objdump -T lib/libpineappl_capi.so | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu | tail -1 - # - name: Upload artifact - # # upload-artifact@v4 uses a newer version of Node that's incompatible with our container's GLIBC - # uses: actions/upload-artifact@v3 - # with: - # name: pineappl_capi-${{ matrix.target }} - # path: pineappl_capi-${{ matrix.target }}.tar.gz + capi-linux: + runs-on: ubuntu-latest + container: ghcr.io/nnpdf/pineappl-ci:latest + strategy: + matrix: + target: [x86_64-unknown-linux-gnu] + steps: + # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC + - uses: actions/checkout@v3 + - name: Compile library + run: | + cd pineappl_capi + cargo cinstall --destdir=prefix --library-type=cdylib --locked --prefix=/ --target=${{ matrix.target }} --verbose + cd prefix + tar czf ../../pineappl_capi-${{ matrix.target }}.tar.gz . + # print the glibc version requirement + objdump -T lib/libpineappl_capi.so | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu | tail -1 + - name: Upload artifact + # upload-artifact@v4 uses a newer version of Node that's incompatible with our container's GLIBC + uses: actions/upload-artifact@v3 + with: + name: pineappl_capi-${{ matrix.target }} + path: pineappl_capi-${{ matrix.target }}.tar.gz - # cli-linux: - # runs-on: ubuntu-latest - # container: ghcr.io/nnpdf/pineappl-ci:latest - # strategy: - # matrix: - # target: [x86_64-unknown-linux-gnu] - # steps: - # # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - # - uses: actions/checkout@v3 - # - name: Compile binary - # run: | - # cargo install --all-features --locked --path pineappl_cli --root=prefix --target=${{ matrix.target }} -vv - # # build manpages - # mkdir -p prefix/share/man/man1 - # cargo xtask install-manpages prefix/share/man/man1 - # cd prefix - # tar czf ../pineappl_cli-${{ matrix.target }}.tar.gz . - # # print the dynamically linked libraries - # ldd bin/pineappl - # - name: Upload artifact - # # upload-artifact@v4 uses a newer version of Node that's incompatible with our container's GLIBC - # uses: actions/upload-artifact@v3 - # with: - # name: pineappl_cli-${{ matrix.target }} - # path: pineappl_cli-${{ matrix.target }}.tar.gz + cli-linux: + runs-on: ubuntu-latest + container: ghcr.io/nnpdf/pineappl-ci:latest + strategy: + matrix: + target: [x86_64-unknown-linux-gnu] + steps: + # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC + - uses: actions/checkout@v3 + - name: Compile binary + run: | + cargo install --all-features --locked --path pineappl_cli --root=prefix --target=${{ matrix.target }} -vv + # build manpages + mkdir -p prefix/share/man/man1 + cargo xtask install-manpages prefix/share/man/man1 + cd prefix + tar czf ../pineappl_cli-${{ matrix.target }}.tar.gz . + # print the dynamically linked libraries + ldd bin/pineappl + - name: Upload artifact + # upload-artifact@v4 uses a newer version of Node that's incompatible with our container's GLIBC + uses: actions/upload-artifact@v3 + with: + name: pineappl_cli-${{ matrix.target }} + path: pineappl_cli-${{ matrix.target }}.tar.gz cli-wheels-linux: runs-on: ubuntu-latest @@ -289,206 +289,206 @@ jobs: name: ${{ github.job }}-${{ matrix.target }} path: dist - # # publish a release on github and upload pre-built CAPI - # publish-release: - # needs: [capi-macos, cli-macos, capi-linux, cli-linux] - # runs-on: ubuntu-latest - # if: "startsWith(github.ref, 'refs/tags/')" - # steps: - # - uses: actions/checkout@v4 - # # version must match the one used in `actions/upload-artifact` - # - uses: actions/download-artifact@v3 - # with: - # path: artifacts - # - name: Create new release - # run: | - # # remove leading 'v' in tag name - # version=${GITHUB_REF_NAME#v} - # prerelease=$(echo ${version} | perl -pe 's/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/\4/') - # if [[ ${prerelease} == "" ]]; then - # # extract the previous version number - # old_version=$(sed -n 's/^## \[\(.*\)\] - .*/\1/p' CHANGELOG.md | tail +2 | head -n 1) - # # extract news for the current version from the changelog file, dismissing - # # empty lines at the start and the end - # news=$(sed -n "/\\[${version}\\]/, /\\[${old_version}\\]/{ /\\[${old_version}\\]/! p }" \ - # CHANGELOG.md | sed -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba') - # gh release edit v${version} -n "${news}" - # else - # gh release edit v${version} -n "" --prerelease - # fi - # find artifacts -name 'pineappl*' -type f -exec gh release upload v${version} {} + - # gh release edit v${version} --draft=false + # publish a release on github and upload pre-built CAPI + publish-release: + needs: [capi-macos, cli-macos, capi-linux, cli-linux] + runs-on: ubuntu-latest + if: "startsWith(github.ref, 'refs/tags/')" + steps: + - uses: actions/checkout@v4 + # version must match the one used in `actions/upload-artifact` + - uses: actions/download-artifact@v3 + with: + path: artifacts + - name: Create new release + run: | + # remove leading 'v' in tag name + version=${GITHUB_REF_NAME#v} + prerelease=$(echo ${version} | perl -pe 's/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/\4/') + if [[ ${prerelease} == "" ]]; then + # extract the previous version number + old_version=$(sed -n 's/^## \[\(.*\)\] - .*/\1/p' CHANGELOG.md | tail +2 | head -n 1) + # extract news for the current version from the changelog file, dismissing + # empty lines at the start and the end + news=$(sed -n "/\\[${version}\\]/, /\\[${old_version}\\]/{ /\\[${old_version}\\]/! p }" \ + CHANGELOG.md | sed -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba') + gh release edit v${version} -n "${news}" + else + gh release edit v${version} -n "" --prerelease + fi + find artifacts -name 'pineappl*' -type f -exec gh release upload v${version} {} + + gh release edit v${version} --draft=false - # publish-crates: - # runs-on: ubuntu-latest - # if: "startsWith(github.ref, 'refs/tags/')" - # container: ghcr.io/nnpdf/pineappl-ci:latest - # steps: - # # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - # - uses: actions/checkout@v3 + publish-crates: + runs-on: ubuntu-latest + if: "startsWith(github.ref, 'refs/tags/')" + container: ghcr.io/nnpdf/pineappl-ci:latest + steps: + # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC + - uses: actions/checkout@v3 - # - name: Publish all crates - # env: - # CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - # run: | - # # this must be at least Rust 1.66 to support waiting for dependencies to on crates.io: - # # https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-166-2022-12-15 - # rustup default stable - # cd pineappl - # cargo publish - # cd ../pineappl_applgrid - # cargo publish - # cd ../pineappl_fastnlo - # cargo publish - # cd ../pineappl_capi - # cargo publish - # cd ../pineappl_cli - # cargo publish + - name: Publish all crates + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: | + # this must be at least Rust 1.66 to support waiting for dependencies to on crates.io: + # https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-166-2022-12-15 + rustup default stable + cd pineappl + cargo publish + cd ../pineappl_applgrid + cargo publish + cd ../pineappl_fastnlo + cargo publish + cd ../pineappl_capi + cargo publish + cd ../pineappl_cli + cargo publish - # wheels-linux: - # runs-on: ubuntu-latest - # strategy: - # matrix: - # target: [x86_64] - # steps: - # - uses: actions/checkout@v4 - # # for Linux the wheels are built in a container, so we don't need the `setup-python` action - # - name: Build wheels - # uses: PyO3/maturin-action@v1 - # with: - # target: ${{ matrix.target }} - # # `--find-interpreter` is needed to generate wheels for *all* Python versions - # args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml - # sccache: 'true' - # manylinux: auto - # - name: Upload wheels - # uses: actions/upload-artifact@v4 - # with: - # name: ${{ github.job }}-${{ matrix.target }} - # path: dist + wheels-linux: + runs-on: ubuntu-latest + strategy: + matrix: + target: [x86_64] + steps: + - uses: actions/checkout@v4 + # for Linux the wheels are built in a container, so we don't need the `setup-python` action + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + # `--find-interpreter` is needed to generate wheels for *all* Python versions + args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml + sccache: 'true' + manylinux: auto + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: ${{ github.job }}-${{ matrix.target }} + path: dist - # wheels-macos: - # runs-on: macos-13 - # strategy: - # matrix: - # target: [aarch64, x86_64] - # steps: - # - uses: actions/checkout@v4 - # - uses: actions/setup-python@v5 - # with: - # # WARNING: be careful with the ordering - the last version is the default one. Apparently - # # maturin doesn't find all Python versions when one chooses a PyPy version instead of - # # CPython as default - # python-version: | - # pypy3.7 - # pypy3.8 - # pypy3.9 - # pypy3.10 - # 3.7 - # 3.8 - # 3.9 - # 3.11 - # 3.12 - # 3.10 - # - name: Build wheels - # uses: PyO3/maturin-action@v1 - # with: - # target: ${{ matrix.target }} - # args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml - # sccache: 'true' - # - name: Upload wheels - # uses: actions/upload-artifact@v4 - # with: - # name: ${{ github.job }}-${{ matrix.target }} - # path: dist + wheels-macos: + runs-on: macos-13 + strategy: + matrix: + target: [aarch64, x86_64] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + # WARNING: be careful with the ordering - the last version is the default one. Apparently + # maturin doesn't find all Python versions when one chooses a PyPy version instead of + # CPython as default + python-version: | + pypy3.7 + pypy3.8 + pypy3.9 + pypy3.10 + 3.7 + 3.8 + 3.9 + 3.11 + 3.12 + 3.10 + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: ${{ github.job }}-${{ matrix.target }} + path: dist - # wheels-sdist: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - name: Build sdist - # uses: PyO3/maturin-action@v1 - # with: - # command: sdist - # args: --out dist --manifest-path pineappl_py/Cargo.toml - # - name: Upload sdist - # uses: actions/upload-artifact@v4 - # with: - # name: ${{ github.job }} - # path: dist + wheels-sdist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build sdist + uses: PyO3/maturin-action@v1 + with: + command: sdist + args: --out dist --manifest-path pineappl_py/Cargo.toml + - name: Upload sdist + uses: actions/upload-artifact@v4 + with: + name: ${{ github.job }} + path: dist - # wheels-windows: - # runs-on: windows-latest - # strategy: - # matrix: - # target: [x64] - # steps: - # - uses: actions/checkout@v4 - # - uses: actions/setup-python@v5 - # with: - # # WARNING: be careful with the ordering - the last version is the default one. Apparently - # # maturin doesn't find all Python versions when one chooses a PyPy version instead of - # # CPython as default - # python-version: | - # pypy3.7 - # pypy3.8 - # pypy3.9 - # pypy3.10 - # 3.7 - # 3.8 - # 3.9 - # 3.11 - # 3.12 - # 3.10 - # architecture: ${{ matrix.target }} - # - name: Build wheels - # uses: PyO3/maturin-action@v1 - # with: - # target: ${{ matrix.target }} - # args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml - # sccache: 'true' - # - name: Upload wheels - # uses: actions/upload-artifact@v4 - # with: - # name: ${{ github.job }}-${{ matrix.target }} - # path: dist + wheels-windows: + runs-on: windows-latest + strategy: + matrix: + target: [x64] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + # WARNING: be careful with the ordering - the last version is the default one. Apparently + # maturin doesn't find all Python versions when one chooses a PyPy version instead of + # CPython as default + python-version: | + pypy3.7 + pypy3.8 + pypy3.9 + pypy3.10 + 3.7 + 3.8 + 3.9 + 3.11 + 3.12 + 3.10 + architecture: ${{ matrix.target }} + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter --manifest-path pineappl_py/Cargo.toml + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: ${{ github.job }}-${{ matrix.target }} + path: dist - # release-cli-wheels: - # runs-on: ubuntu-latest - # if: "startsWith(github.ref, 'refs/tags/')" - # needs: - # - cli-wheels-linux - # - cli-wheels-macos - # steps: - # - uses: actions/download-artifact@v4 - # with: - # pattern: "cli-wheels-*" - # merge-multiple: true - # - name: Publish to PyPI - # uses: PyO3/maturin-action@v1 - # env: - # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_CLI }} - # with: - # command: upload - # args: --skip-existing * + release-cli-wheels: + runs-on: ubuntu-latest + if: "startsWith(github.ref, 'refs/tags/')" + needs: + - cli-wheels-linux + - cli-wheels-macos + steps: + - uses: actions/download-artifact@v4 + with: + pattern: "cli-wheels-*" + merge-multiple: true + - name: Publish to PyPI + uses: PyO3/maturin-action@v1 + env: + MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_CLI }} + with: + command: upload + args: --skip-existing * - # release-wheels: - # runs-on: ubuntu-latest - # if: "startsWith(github.ref, 'refs/tags/')" - # needs: - # - wheels-linux - # - wheels-macos - # - wheels-sdist - # - wheels-windows - # steps: - # - uses: actions/download-artifact@v4 - # with: - # pattern: "wheels-*" - # merge-multiple: true - # - name: Publish to PyPI - # uses: PyO3/maturin-action@v1 - # env: - # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - # with: - # command: upload - # args: --skip-existing * + release-wheels: + runs-on: ubuntu-latest + if: "startsWith(github.ref, 'refs/tags/')" + needs: + - wheels-linux + - wheels-macos + - wheels-sdist + - wheels-windows + steps: + - uses: actions/download-artifact@v4 + with: + pattern: "wheels-*" + merge-multiple: true + - name: Publish to PyPI + uses: PyO3/maturin-action@v1 + env: + MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + with: + command: upload + args: --skip-existing * From bd3ca4288511cf5e39e6ab107694fae98e3cb228 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 13:11:56 +0200 Subject: [PATCH 19/24] Update CI action version numbers --- .github/workflows/capi.yaml | 10 ++-------- .github/workflows/msrv.yml | 6 +----- .github/workflows/python.yml | 4 ++-- .github/workflows/release.yml | 12 +++--------- .github/workflows/rust.yml | 8 ++------ 5 files changed, 10 insertions(+), 30 deletions(-) diff --git a/.github/workflows/capi.yaml b/.github/workflows/capi.yaml index 86dbbb36..c5cfce87 100644 --- a/.github/workflows/capi.yaml +++ b/.github/workflows/capi.yaml @@ -6,18 +6,13 @@ on: - pycli - update-container-2 -env: - # our GLIBC version is too old to support Node 20: - # https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - jobs: capi: runs-on: ubuntu-latest container: ghcr.io/nnpdf/pineappl-ci:latest steps: # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install PineAPPL's C API run: | @@ -62,8 +57,7 @@ jobs: grep SF lcov.info | sort -u | sed 's/SF://' - name: Upload to codecov.io - # version 3.1.5 upgrades to Node 20 (https://github.com/codecov/codecov-action/issues/1230), which breaks inside our container - uses: codecov/codecov-action@v3.1.4 + uses: codecov/codecov-action@v4 with: token: ${{secrets.CODECOV_TOKEN}} flags: capi diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index b2d43b33..09c9731f 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -8,17 +8,13 @@ on: env: CARGO_TERM_COLOR: always - # our GLIBC version is too old to support Node 20: - # https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true jobs: build: runs-on: ubuntu-latest container: ghcr.io/nnpdf/pineappl-ci:latest steps: - # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run check run: | diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 56968325..00073538 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -15,7 +15,7 @@ jobs: python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: @@ -29,7 +29,7 @@ jobs: maturin develop --extras test pytest - name: Upload to codecov.io - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{secrets.CODECOV_TOKEN}} files: pineappl_py/coverage.xml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 096afaa7..e2433106 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,9 +9,6 @@ on: env: # this is make the `gh` binary work GH_TOKEN: ${{ github.token }} - # our GLIBC version is too old to support Node 20: - # https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true jobs: # create a release on github @@ -164,8 +161,7 @@ jobs: matrix: target: [x86_64-unknown-linux-gnu] steps: - # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Compile library run: | cd pineappl_capi @@ -188,8 +184,7 @@ jobs: matrix: target: [x86_64-unknown-linux-gnu] steps: - # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Compile binary run: | cargo install --all-features --locked --path pineappl_cli --root=prefix --target=${{ matrix.target }} -vv @@ -324,8 +319,7 @@ jobs: if: "startsWith(github.ref, 'refs/tags/')" container: ghcr.io/nnpdf/pineappl-ci:latest steps: - # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Publish all crates env: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 77869523..e5ac8715 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,17 +12,13 @@ defaults: env: CARGO_TERM_COLOR: always - # our GLIBC version is too old to support Node 20: - # https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true jobs: build: runs-on: ubuntu-latest container: ghcr.io/nnpdf/pineappl-ci:latest steps: - # checkout@v4 uses a newer version of Node that's incompatible with our container's GLIBC - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Get test data id: cache-test-data @@ -95,7 +91,7 @@ jobs: - name: Upload to codecov.io # version 3.1.5 upgrades to Node 20 (https://github.com/codecov/codecov-action/issues/1230), which breaks inside our container - uses: codecov/codecov-action@v3.1.4 + uses: codecov/codecov-action@v4 with: token: ${{secrets.CODECOV_TOKEN}} flags: rust From b837c4879c025a9ed8300a117ff6a16bb2845343 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 13:12:23 +0200 Subject: [PATCH 20/24] Run actions again --- .github/workflows/capi.yaml | 1 - .github/workflows/msrv.yml | 1 - .github/workflows/python.yml | 1 - .github/workflows/rust.yml | 1 - 4 files changed, 4 deletions(-) diff --git a/.github/workflows/capi.yaml b/.github/workflows/capi.yaml index c5cfce87..115a1667 100644 --- a/.github/workflows/capi.yaml +++ b/.github/workflows/capi.yaml @@ -4,7 +4,6 @@ on: push: branches-ignore: - pycli - - update-container-2 jobs: capi: diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index 09c9731f..9bd9ac88 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -4,7 +4,6 @@ on: push: branches-ignore: - pycli - - update-container-2 env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 00073538..afdbee99 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -4,7 +4,6 @@ on: push: branches-ignore: - pycli - - update-container-2 jobs: test: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e5ac8715..c32a0c24 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,7 +4,6 @@ on: push: branches-ignore: - pycli - - update-container-2 defaults: run: From ca4c235e5d82d711218095fb729b11cf74477716 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 13:16:07 +0200 Subject: [PATCH 21/24] Update `setup-python` action to `v5` --- .github/workflows/python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index afdbee99..9eec94e4 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Test From fc953161436e2e1603bad1c3c6668b8e1e5cf89d Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 13:16:31 +0200 Subject: [PATCH 22/24] Add some cosmetic spaces --- .github/workflows/capi.yaml | 2 +- .github/workflows/python.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/capi.yaml b/.github/workflows/capi.yaml index 115a1667..c8be7704 100644 --- a/.github/workflows/capi.yaml +++ b/.github/workflows/capi.yaml @@ -58,5 +58,5 @@ jobs: - name: Upload to codecov.io uses: codecov/codecov-action@v4 with: - token: ${{secrets.CODECOV_TOKEN}} + token: ${{ secrets.CODECOV_TOKEN }} flags: capi diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 9eec94e4..a28f8b3a 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -30,6 +30,6 @@ jobs: - name: Upload to codecov.io uses: codecov/codecov-action@v4 with: - token: ${{secrets.CODECOV_TOKEN}} + token: ${{ secrets.CODECOV_TOKEN }} files: pineappl_py/coverage.xml flags: python From 01343c63d170f7461e3d366f7104188c4cbaea4c Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 13:26:19 +0200 Subject: [PATCH 23/24] Increase `cache` action version --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c32a0c24..30e5e0b4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,7 +21,7 @@ jobs: - name: Get test data id: cache-test-data - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: test-data key: test-data-v11 From 0fca5fdd8fe1670a0a91234114f7860ef3e4c225 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Sat, 6 Jul 2024 13:37:49 +0200 Subject: [PATCH 24/24] Increase `artifact` action version numbers --- .github/workflows/release.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2433106..b105f138 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,8 +38,7 @@ jobs: cd prefix tar czf ../../pineappl_capi-${{ matrix.target }}.tar.gz . - name: Upload artifact - # as long as we need v3 in `capi-linux` we also must use it here - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pineappl_capi-${{ matrix.target }} path: pineappl_capi-${{ matrix.target }}.tar.gz @@ -88,8 +87,7 @@ jobs: cd prefix tar czf ../pineappl_cli-${{ matrix.target }}.tar.gz . - name: Upload artifact - # as long as we need v3 in `cli-linux` we also must use it here - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pineappl_cli-${{ matrix.target }} path: pineappl_cli-${{ matrix.target }}.tar.gz @@ -171,8 +169,7 @@ jobs: # print the glibc version requirement objdump -T lib/libpineappl_capi.so | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu | tail -1 - name: Upload artifact - # upload-artifact@v4 uses a newer version of Node that's incompatible with our container's GLIBC - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pineappl_capi-${{ matrix.target }} path: pineappl_capi-${{ matrix.target }}.tar.gz @@ -196,8 +193,7 @@ jobs: # print the dynamically linked libraries ldd bin/pineappl - name: Upload artifact - # upload-artifact@v4 uses a newer version of Node that's incompatible with our container's GLIBC - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pineappl_cli-${{ matrix.target }} path: pineappl_cli-${{ matrix.target }}.tar.gz @@ -292,7 +288,7 @@ jobs: steps: - uses: actions/checkout@v4 # version must match the one used in `actions/upload-artifact` - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: path: artifacts - name: Create new release