Remove yaml-cpp from apt list #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Corsika8 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
fmt_version: 10.2.1 | |
spdlog_version: 1.14.1 | |
cubic_version: 0.1.5 | |
proposal_version: 7.6.2 | |
catch2_version: 3.6.0 | |
yaml-cpp_version: 0.8.0 | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-22.04 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install prerequisites | |
shell: bash | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y python3 python3-pip cmake g++ gfortran git doxygen graphviz \ | |
libboost-all-dev libcli11-dev libeigen3-dev \ | |
libre2-dev libzstd-dev liblz4-dev zlib1g-dev libprotobuf-dev \ | |
nlohmann-json3-dev ca-certificates lsb-release wget | |
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb | |
sudo apt install -y ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb | |
sudo apt update -y | |
sudo apt install -y -V libarrow-dev libarrow-dataset-dev libparquet-dev | |
pip install pyarrow | |
- name: Build pre-installation file list | |
shell: bash | |
run: sudo find /usr -print > filelist_before.txt | |
- name: Install fmt library | |
shell: bash | |
run: | | |
mkdir fmt | |
cd fmt | |
wget -qO - https://github.com/fmtlib/fmt/archive/refs/tags/${{ env.fmt_version }}.tar.gz | tar zxf - | |
cd fmt-${{ env.fmt_version }} | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/usr | |
make -j4 | |
sudo make install | |
- name: Install spdlog library | |
shell: bash | |
run: | | |
mkdir spdlog | |
cd spdlog | |
wget -qO - https://github.com/gabime/spdlog/archive/refs/tags/v${{ env.spdlog_version }}.tar.gz | tar zxf - | |
cd spdlog-${{ env.spdlog_version }} | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/usr | |
make -j4 | |
sudo make install | |
- name: Install Catch2 library | |
shell: bash | |
run: | | |
mkdir Catch2 | |
cd Catch2 | |
wget -qO - https://github.com/catchorg/Catch2/archive/refs/tags/v${{ env.catch2_version }}.tar.gz | tar zxf - | |
cd Catch2-${{ env.catch2_version }} | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/usr | |
make -j4 | |
sudo make install | |
- name: Install yaml-cpp library | |
shell: bash | |
run: | | |
mkdir yaml-cpp | |
cd yaml-cpp | |
wget -qO - https://github.com/jbeder/yaml-cpp/archive/refs/tags/${{ env.yaml-cpp_version }}.tar.gz | tar zxf - | |
cd yaml-cpp-${{ env.yaml-cpp_version }} | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/usr | |
make -j4 | |
sudo make install | |
- name: Install Cubic Interpolation | |
shell: bash | |
run: | | |
mkdir cubic_interpolation | |
cd cubic_interpolation | |
wget -qO - https://github.com/tudo-astroparticlephysics/cubic_interpolation/archive/refs/tags/v${{ env.cubic_version }}.tar.gz | tar zxf - | |
cd cubic_interpolation-${{ env.cubic_version }} | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/usr | |
make -j4 | |
sudo make install | |
- name: Install PROPOSAL | |
shell: bash | |
run: | | |
mkdir proposal | |
cd proposal | |
wget -qO - https://github.com/tudo-astroparticlephysics/PROPOSAL/archive/refs/tags/${{ env.proposal_version }}.tar.gz | tar zxf - | |
cd PROPOSAL-${{ env.proposal_version }} | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/usr | |
make -j4 | |
sudo make install | |
sudo sed -i -e '/PROPOSAL_INCLUDE_DIR/s/\/include/\/usr\/include/' /usr/lib/x86_64-linux-gnu/cmake/PROPOSAL/PROPOSALConfig.cmake | |
sudo sed -i -e '/PROPOSAL_LIBRARIES/s/\/lib/\/usr\/lib/' /usr/lib/x86_64-linux-gnu/cmake/PROPOSAL/PROPOSALConfig.cmake | |
- name: Install Corsika 8 | |
continue-on-error: true | |
shell: bash | |
run: | | |
git clone --recursive https://gitlab.iap.kit.edu/AirShowerPhysics/corsika.git | |
sed -i -e '/^find_package(Arrow/s/$/\nfind_package(Parquet REQUIRED)/' corsika/CMakeLists.txt | |
sed -i -e '/^find_package(Boost/s/filesystem/filesystem math_tr1/' corsika/CMakeLists.txt | |
sed -i -e 's/Boost::filesystem/Boost::filesystem Boost::math_tr1/' corsika/CMakeLists.txt | |
mkdir corsika/build | |
cd corsika/build | |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DCMAKE_INSTALL_LIBDIR=x86_64-linux-gnu \ | |
-DCMAKE_PREFIX_PATH=/usr \ | |
.. | |
make -j4 | |
sudo make install | |
- name: Build post-installation file list | |
shell: bash | |
run: sudo find /usr -print > filelist_after.txt | |
- name: Package Corsika 8 in TGZ file | |
shell: bash | |
run: | | |
cat filelist_before.txt filelist_after.txt | sort | uniq -u > filelist_diff.txt | |
sudo tar -zpcf corsika8_installed.tgz --ignore-failed-read -C / -T filelist_diff.txt | |
ls -l corsika8_installed.tgz | |
- name: Publish file list in artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Filelist | |
path: filelist_after.txt | |
- name: Publish tar file in Github release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: corsika8_installed.tgz | |
name: "Build of CORSIKA 8 on ${{ matrix.os }}" | |
tag_name: "${{ matrix.os }}" | |
body: Automated build of CORSIKA 8 and some dependencies | |
prerelease: true |