Skip to content

Commit

Permalink
appimage for bgk and fp
Browse files Browse the repository at this point in the history
  • Loading branch information
marpfeiffer committed May 14, 2024
1 parent 60463cc commit beb8e37
Showing 1 changed file with 91 additions and 3 deletions.
94 changes: 91 additions & 3 deletions .github/workflows/cmake-ninja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,34 @@ jobs:
source ~/.bashrc
cmake --build build_DSMC
- name: Configure CMake Piclas BGK
shell: bash
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
source ~/.bashrc
cmake -G Ninja -B build_BGK -DPICLAS_INSTRUCTION=-mtune=generic -DPOSTI_BUILD_PICLAS2VTK=OFF -DPOSTI_BUILD_SUPERB=OFF -DPICLAS_POLYNOMIAL_DEGREE=1 -DPICLAS_TIMEDISCMETHOD=BGK-Flow -DCMAKE_BUILD_TYPE=Release -DLIBS_USE_MPI=ON -DLIBS_BUILD_HDF5=OFF -DPICLAS_READIN_CONSTANTS=ON -DCMAKE_INSTALL_PREFIX=/usr
- name: Build Piclas BGK
shell: bash
run: |
source ~/.bashrc
cmake --build build_BGK
- name: Configure CMake Piclas FP
shell: bash
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
source ~/.bashrc
cmake -G Ninja -B build_FP -DPICLAS_INSTRUCTION=-mtune=generic -DPOSTI_BUILD_PICLAS2VTK=OFF -DPOSTI_BUILD_SUPERB=OFF -DPICLAS_POLYNOMIAL_DEGREE=1 -DPICLAS_TIMEDISCMETHOD=FP-Flow -DCMAKE_BUILD_TYPE=Release -DLIBS_USE_MPI=ON -DLIBS_BUILD_HDF5=OFF -DPICLAS_READIN_CONSTANTS=ON -DCMAKE_INSTALL_PREFIX=/usr
- name: Build Piclas FP
shell: bash
run: |
source ~/.bashrc
cmake --build build_FP
- name: Configure CMake Piclas Poisson Leapfrog
shell: bash
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Expand Down Expand Up @@ -268,6 +296,62 @@ jobs:
ls -la
cd ..
echo "======================================================================="
ls -la build_BGK/bin
echo "======================================================================="
cd build_BGK
# Declare an array of strings
declare -a PROGS=("piclas")
# Iterate the string array
for PROG in ${PROGS[@]}; do
rm -rf AppDir
DESTDIR=AppDir ninja install
mkdir -p AppDir/usr/share/icons
cp ../docs/logo.png AppDir/usr/share/icons/${PROG}.png
mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/
ln -sf ../../../${PROG}.png AppDir/usr/share/icons/hicolor/64x64/apps/
cp ../.github/workflows/piclas.desktop template.desktop
mv template.desktop ${PROG}.desktop
sed -i -e "s/Name=.*/Name=${PROG}/" ${PROG}.desktop
sed -i -e "s/Exec=.*/Exec=${PROG}/" ${PROG}.desktop
sed -i -e "s/Icon=.*/Icon=${PROG}/" ${PROG}.desktop
./../linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage --desktop-file=${PROG}.desktop
done
# Check folder contents
ls -la
cd ..
echo "======================================================================="
ls -la build_FP/bin
echo "======================================================================="
cd build_FP
# Declare an array of strings
declare -a PROGS=("piclas")
# Iterate the string array
for PROG in ${PROGS[@]}; do
rm -rf AppDir
DESTDIR=AppDir ninja install
mkdir -p AppDir/usr/share/icons
cp ../docs/logo.png AppDir/usr/share/icons/${PROG}.png
mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/
ln -sf ../../../${PROG}.png AppDir/usr/share/icons/hicolor/64x64/apps/
cp ../.github/workflows/piclas.desktop template.desktop
mv template.desktop ${PROG}.desktop
sed -i -e "s/Name=.*/Name=${PROG}/" ${PROG}.desktop
sed -i -e "s/Exec=.*/Exec=${PROG}/" ${PROG}.desktop
sed -i -e "s/Icon=.*/Icon=${PROG}/" ${PROG}.desktop
./../linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage --desktop-file=${PROG}.desktop
done
# Check folder contents
ls -la
cd ..
echo "======================================================================="
ls -la build_poisson_leapfrog/bin
echo "======================================================================="
Expand Down Expand Up @@ -304,21 +388,25 @@ jobs:
cp build_single/piclas2vtk*x86_64.AppImage piclas2vtk
cp build_single/superB*x86_64.AppImage superB
cp build_DSMC/piclas-*x86_64.AppImage piclasDSMC
cp build_BGK/piclas-*x86_64.AppImage piclasBGK
cp build_FP/piclas-*x86_64.AppImage piclasFP
cp build_poisson_leapfrog/piclas-*x86_64.AppImage piclasLeapfrogHDG
md5sum piclasDSMC > md5sum.txt
md5sum piclasBGK > md5sum.txt
md5sum piclasFP > md5sum.txt
md5sum piclasLeapfrogHDG >> md5sum.txt
md5sum piclas2vtk >> md5sum.txt
md5sum superB >> md5sum.txt
cat md5sum.txt
7z a release-assets/piclas-linux64.zip piclasDSMC piclasLeapfrogHDG piclas2vtk superB md5sum.txt
7z a release-assets/piclas-linux64.zip piclasDSMC piclasBGK piclasFP piclasLeapfrogHDG piclas2vtk superB md5sum.txt
ls -la release-assets
mv piclasDSMC piclasLeapfrogHDG piclas2vtk superB md5sum.txt artifacts/.
mv piclasDSMC piclasBGK piclasFP piclasLeapfrogHDG piclas2vtk superB md5sum.txt artifacts/.
ls -la artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: piclas-binaries-v3.2.0
name: piclas-binaries-v3.2.1
path: artifacts

- name: Upload release asset
Expand Down

0 comments on commit beb8e37

Please sign in to comment.