Minor update #215
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: Release | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
VPMR_VERSION: "" | |
jobs: | |
debian: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
container: debian:bookworm | |
steps: | |
- name: Setup | |
run: | | |
echo "VPMR_VERSION=$(date +''%y%m%d'')" >> $GITHUB_ENV | |
apt-get update && apt-get install -y cmake git g++ libtbb-dev libmpfr-dev libgmp-dev libpython3-dev python3 python3-distutils wget gtk-update-icon-cache | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: Compile | |
run: | | |
git config --global --add safe.directory /__w/vpmr/vpmr | |
git submodule update --init --recursive | |
cd eigen && git apply ../patch_size.patch && cd .. | |
sed -i 's/3.24/3.13/g' CMakeLists.txt | |
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. | |
make -j"$(nproc)" | |
- name: AppImage | |
run: | | |
echo "version: 1" >> AppImageBuilder.yml | |
echo "AppDir:" >> AppImageBuilder.yml | |
echo " path: build/AppDir" >> AppImageBuilder.yml | |
echo " app_info:" >> AppImageBuilder.yml | |
echo " id: io.github.tlcfem.vpmr" >> AppImageBuilder.yml | |
echo " name: vpmr" >> AppImageBuilder.yml | |
echo " version: '${{ env.VPMR_VERSION }}'" >> AppImageBuilder.yml | |
echo " icon: vpmr" >> AppImageBuilder.yml | |
echo " exec: usr/bin/vpmr" >> AppImageBuilder.yml | |
echo " exec_args: \$@" >> AppImageBuilder.yml | |
echo " files:" >> AppImageBuilder.yml | |
echo " include:" >> AppImageBuilder.yml | |
echo " - lib64/ld-linux-x86-64.so.2" >> AppImageBuilder.yml | |
echo " exclude:" >> AppImageBuilder.yml | |
echo " - usr/share/man" >> AppImageBuilder.yml | |
echo " - usr/share/doc/*/README.*" >> AppImageBuilder.yml | |
echo " - usr/share/doc/*/changelog.*" >> AppImageBuilder.yml | |
echo " - usr/share/doc/*/NEWS.*" >> AppImageBuilder.yml | |
echo " - usr/share/doc/*/TODO.*" >> AppImageBuilder.yml | |
echo " test:" >> AppImageBuilder.yml | |
echo " fedora-30:" >> AppImageBuilder.yml | |
echo " image: appimagecrafters/tests-env:fedora-30" >> AppImageBuilder.yml | |
echo " command: ./AppRun -h" >> AppImageBuilder.yml | |
echo " debian-stable:" >> AppImageBuilder.yml | |
echo " image: appimagecrafters/tests-env:debian-stable" >> AppImageBuilder.yml | |
echo " command: ./AppRun -h" >> AppImageBuilder.yml | |
echo " archlinux-latest:" >> AppImageBuilder.yml | |
echo " image: appimagecrafters/tests-env:archlinux-latest" >> AppImageBuilder.yml | |
echo " command: ./AppRun -h" >> AppImageBuilder.yml | |
echo " centos-7:" >> AppImageBuilder.yml | |
echo " image: appimagecrafters/tests-env:centos-7" >> AppImageBuilder.yml | |
echo " command: ./AppRun -h" >> AppImageBuilder.yml | |
echo " ubuntu-xenial:" >> AppImageBuilder.yml | |
echo " image: appimagecrafters/tests-env:ubuntu-xenial" >> AppImageBuilder.yml | |
echo " command: ./AppRun -h" >> AppImageBuilder.yml | |
echo "AppImage:" >> AppImageBuilder.yml | |
echo " arch: x86_64" >> AppImageBuilder.yml | |
echo " update-information: guess" >> AppImageBuilder.yml | |
cat AppImageBuilder.yml | |
- name: Package | |
run: | | |
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20220822-1/linuxdeploy-x86_64.AppImage | |
chmod +x linuxdeploy-x86_64.AppImage | |
wget -q https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage | |
chmod +x appimage-builder-1.1.0-x86_64.AppImage | |
./linuxdeploy-x86_64.AppImage --appimage-extract-and-run --appdir AppDir --executable build/vpmr -i resource/vpmr.svg | |
./appimage-builder-1.1.0-x86_64.AppImage --appimage-extract-and-run --recipe AppImageBuilder.yml --skip-tests | |
chmod +x vpmr-${{ env.VPMR_VERSION }}-x86_64.AppImage | |
./vpmr-${{ env.VPMR_VERSION }}-x86_64.AppImage --appimage-extract-and-run -h | |
- name: Release | |
if: contains(github.event.head_commit.message, '[publish]') | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: vpmr-${{ env.VPMR_VERSION }}-x86_64.AppImage | |
asset_name: vpmr-${{ env.VPMR_VERSION }}-x86_64.AppImage | |
tag: v${{ env.VPMR_VERSION }} | |
prerelease: false | |
overwrite: true | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vpmr-${{ env.VPMR_VERSION }}-x86_64.AppImage | |
path: vpmr-${{ env.VPMR_VERSION }}-x86_64.AppImage |