All checks were successful
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m8s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m57s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m55s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m0s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m30s
Build Packages / Generate python client (push) Successful in 20s
Build Packages / Unit tests (push) Has been skipped
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 39s
Build Packages / build:rpm (rocky8) (push) Successful in 9m23s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 10m33s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m2s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 8m42s
Build Packages / build:rpm (rocky9) (push) Successful in 9m38s
This is an UNSTABLE release. This version adds scalign and merging. These are experimental at the moment, and should not be used for production analysis. If things go wrong with analysis, it is better to revert to 1.0.0-rc.124. * jfjoch_broker: Improve logic on switching on/off spot finding * jfjoch_broker: Increase maximum spot count for FFBIDX to 65536 * jfjoch_broker: Increase default maximum unit cell for FFT to 500 A (could have performance impact, TBD) * jfjoch_process: Add scalign and merging functionality - program is experimental at the moment and should not be used for production analysis * jfjoch_viewer: Display partiality and reciprocal Lorentz-polarization correction for each reflection * jfjoch_writer: Save more information about each reflection Reviewed-on: #32 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
213 lines
7.8 KiB
YAML
213 lines
7.8 KiB
YAML
name: Build Packages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
tags:
|
|
- '**'
|
|
pull_request:
|
|
workflow_dispatch:
|
|
inputs:
|
|
create_release:
|
|
type: boolean
|
|
description: 'Create release'
|
|
required: false
|
|
default: false
|
|
|
|
jobs:
|
|
build-rpm:
|
|
name: build:rpm (${{ matrix.distro }})
|
|
if: github.ref_type != 'workflow_dispatch'
|
|
runs-on: ${{ matrix.runner }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runner: jfjoch_rocky8
|
|
distro: rocky8
|
|
cmake_flags: -DJFJOCH_USE_CUDA=ON
|
|
pkg_glob: "*.rpm"
|
|
upload_url: https://gitea.psi.ch/api/packages/mx/rpm/centos/el8/slsdet8-cuda12/upload
|
|
- runner: jfjoch_rocky8
|
|
distro: rocky8_sls9
|
|
cmake_flags: -DJFJOCH_USE_CUDA=ON -DSLS9=ON
|
|
pkg_glob: "*.rpm"
|
|
upload_url: https://gitea.psi.ch/api/packages/mx/rpm/centos/el8/slsdet9-cuda12/upload
|
|
- runner: jfjoch_rocky8
|
|
distro: rocky8_nocuda
|
|
cmake_flags: -DJFJOCH_USE_CUDA=OFF
|
|
pkg_glob: "*.rpm"
|
|
upload_url: https://gitea.psi.ch/api/packages/mx/rpm/centos/el8/slsdet8-nocuda/upload
|
|
- runner: jfjoch_rocky9
|
|
distro: rocky9
|
|
cmake_flags: -DJFJOCH_USE_CUDA=ON
|
|
pkg_glob: "*.rpm"
|
|
upload_url: https://gitea.psi.ch/api/packages/mx/rpm/centos/el9/slsdet8-cuda13/upload
|
|
- runner: jfjoch_rocky9
|
|
distro: rocky9_sls9
|
|
cmake_flags: -DJFJOCH_USE_CUDA=ON -DSLS9=ON
|
|
pkg_glob: "*.rpm"
|
|
upload_url: https://gitea.psi.ch/api/packages/mx/rpm/centos/el9/slsdet9-cuda13/upload
|
|
- runner: jfjoch_rocky9
|
|
distro: rocky9_nocuda
|
|
cmake_flags: -DJFJOCH_USE_CUDA=OFF
|
|
pkg_glob: "*.rpm"
|
|
upload_url: https://gitea.psi.ch/api/packages/mx/rpm/centos/el9/slsdet8-nocuda/upload
|
|
- runner: jfjoch_ubuntu2204
|
|
distro: ubuntu2204
|
|
cmake_flags: -DJFJOCH_USE_CUDA=ON
|
|
pkg_glob: "*.deb"
|
|
upload_url: https://gitea.psi.ch/api/packages/mx/debian/pool/jammy/cuda13/upload
|
|
- runner: jfjoch_ubuntu2204
|
|
distro: ubuntu2204_nocuda
|
|
cmake_flags: -DJFJOCH_USE_CUDA=OFF
|
|
pkg_glob: "*.deb"
|
|
upload_url: https://gitea.psi.ch/api/packages/mx/debian/pool/jammy/nocuda/upload
|
|
- runner: jfjoch_ubuntu2404
|
|
distro: ubuntu2404
|
|
cmake_flags: -DJFJOCH_USE_CUDA=ON
|
|
pkg_glob: "*.deb"
|
|
upload_url: https://gitea.psi.ch/api/packages/mx/debian/pool/noble/cuda13/upload
|
|
- runner: jfjoch_ubuntu2404
|
|
distro: ubuntu2404_nocuda
|
|
cmake_flags: -DJFJOCH_USE_CUDA=OFF
|
|
pkg_glob: "*.deb"
|
|
upload_url: https://gitea.psi.ch/api/packages/mx/debian/pool/noble/nocuda/upload
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build packages
|
|
shell: bash
|
|
run: |
|
|
mkdir -p build
|
|
cd build
|
|
cmake -G Ninja -DJFJOCH_INSTALL_DRIVER_SOURCE=ON -DJFJOCH_VIEWER_BUILD=ON -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_flags }} ..
|
|
ninja frontend
|
|
ninja -j16 package
|
|
- name: Upload packages
|
|
if: github.ref_type == 'tag'
|
|
shell: bash
|
|
env:
|
|
TOKEN: ${{ secrets.PIP_REPOSITORY_API_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
cd build
|
|
shopt -s nullglob
|
|
files=(${{ matrix.pkg_glob }})
|
|
if [ ${#files[@]} -eq 0 ]; then
|
|
echo "No package files found for pattern: ${{ matrix.pkg_glob }}"
|
|
exit 1
|
|
fi
|
|
for file in "${files[@]}"; do
|
|
echo "Uploading $file -> ${{ matrix.upload_url }}"
|
|
curl --fail --user __token__:"$TOKEN" --upload-file "$file" "${{ matrix.upload_url }}"
|
|
done
|
|
|
|
cd ..
|
|
|
|
if [ "${{ matrix.distro }}" = "rocky8_nocuda" ]; then
|
|
for file in build/jfjoch-viewer*.rpm build/jfjoch-writer*rpm; do
|
|
python3 gitea_upload_file.py "$file"
|
|
done
|
|
elif [ "${{ matrix.distro }}" = "rocky9_nocuda" ]; then
|
|
for file in build/jfjoch-viewer*.rpm build/jfjoch-writer*rpm; do
|
|
python3 gitea_upload_file.py "$file"
|
|
done
|
|
elif [ "${{ matrix.distro }}" = "ubuntu2204_nocuda" ]; then
|
|
for file in build/jfjoch*viewer*.deb build/jfjoch*writer*.deb; do
|
|
python3 gitea_upload_file.py "$file"
|
|
done
|
|
fi
|
|
python-client:
|
|
name: Generate python client
|
|
runs-on: jfjoch_rocky8
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build python client
|
|
shell: bash
|
|
run: bash gen_python_client.sh
|
|
- name: Upload Package to Gitea PyPI
|
|
if: github.ref_type == 'tag'
|
|
run: |
|
|
twine upload -u __token__ -p ${{ secrets.CI_PYPI_TOKEN }} --skip-existing dist/*
|
|
twine upload -u __token__ -p ${{ secrets.PIP_REPOSITORY_API_TOKEN }} --repository-url https://gitea.psi.ch/api/packages/mx/pypi dist/*
|
|
documentation:
|
|
name: Build documentation
|
|
runs-on: jfjoch_rocky8
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build documentation
|
|
shell: bash
|
|
run: bash make_doc.sh
|
|
- name: Upload documentation
|
|
if: github.ref_type == 'tag'
|
|
shell: bash
|
|
run: |
|
|
git config --global user.email "filip.leonarski@psi.ch"
|
|
git config --global user.name "Filip Leonarski (Gitea)"
|
|
git checkout --orphan gitea-pages
|
|
git reset --hard
|
|
# Remove everything except .git and public
|
|
git clean -fdx -e public -e .git
|
|
|
|
# Move public contents to root and remove the now-empty public dir
|
|
shopt -s dotglob nullglob
|
|
mv public/* .
|
|
rm -rf public
|
|
git add .
|
|
git commit -m "Deploy site"
|
|
git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git gitea-pages
|
|
unit-tests:
|
|
name: Unit tests
|
|
runs-on: jfjoch_rocky8
|
|
if: github.ref_type != 'tag' && github.ref_type != 'workflow_dispatch'
|
|
container:
|
|
image: gitea.psi.ch/leonarski_f/jfjoch_rocky8:2511
|
|
options: --gpus all
|
|
timeout-minutes: 90
|
|
env:
|
|
CTEST_OUTPUT_ON_FAILURE: '1'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build tests
|
|
shell: bash
|
|
run: |
|
|
mkdir -p build
|
|
cd build
|
|
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
|
|
ninja -j48 jfjoch_test jfjoch_hdf5_test
|
|
- name: Run unit tests
|
|
shell: bash
|
|
run: |
|
|
cd build/tests
|
|
./jfjoch_test
|
|
- name: Run hdf5 test
|
|
shell: bash
|
|
run: |
|
|
cd build/tools
|
|
./jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5
|
|
|
|
create-release:
|
|
name: Create release
|
|
runs-on: jfjoch_rocky8
|
|
if: github.event_name == 'workflow_dispatch' && (github.event.inputs.create_release == 'true' || github.event.inputs.create_release == true)
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: 'true' # Optional; should be the default
|
|
- name: Configure auth and fetch LFS
|
|
shell: bash
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.PIP_REPOSITORY_API_TOKEN }}
|
|
run: |
|
|
git lfs install --local
|
|
AUTH=$(git config --local http.${{ github.server_url }}/.extraheader)
|
|
git config --local --unset http.${{ github.server_url }}/.extraheader
|
|
git config --local http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH"
|
|
git lfs pull
|
|
- name: Create release
|
|
env:
|
|
TOKEN: ${{ secrets.PIP_REPOSITORY_API_TOKEN }}
|
|
shell: bash
|
|
run: |
|
|
python3 gitea_create_release.py |