Skip to content

Commit

Permalink
Add workflow to create tarball for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
daljit46 committed Feb 15, 2024
1 parent 205dd53 commit 6ec70f3
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/package-linux-tarball.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: package-linux-tarball

on:
release:
types: [created]

jobs:
linux-clang-build:
runs-on: ubuntu-20.04

env:
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_SIZE: "2G"

steps:
- uses: actions/checkout@v1
with:
submodules: true

- name: install dependencies
run: |
sudo apt install cmake \
'^libxcb.*-dev' \
libgl1-mesa-dev \
ninja-build \
python3 \
libeigen3-dev \
zlib1g-dev \
libfftw3-dev \
libtiff5-dev \
libpng-dev
- name: Install Clang 17
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.5.3'
host: 'linux'
arch: 'gcc_64'
cache-key-prefix: 'install-qt-action'
set-env: 'true'

- name: configure
run: >
cmake
-B build
-G Ninja
-D CMAKE_CXX_COMPILER=clang++-17
-D CMAKE_BUILD_TYPE=Release
-D MRTRIX_USE_QT6=ON
- name: build
run: cmake --build build

- name: install
run: cmake --install build --prefix ./mrtrix3_install

- name: Run linuxdeploy
run: |
wget "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
wget "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
chmod +x ./linuxdeploy-x86_64.AppImage
chmod +x ./linuxdeploy-plugin-qt-x86_64.AppImage
mkdir appdir && mkdir appdir/usr
cp -r mrtrix3_install/* appdir/usr
./linuxdeploy-x86_64.AppImage --appdir appdir --plugin qt --verbosity=0
- name: Create tarball
run: tar -czf mrtrix3-$(git describe --tags --abbrev=0)-linux.tar.gz appdir/usr

- name: Upload package to GitHub Release
uses: AButler/[email protected]
with:
files: '*.tar.gz'
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6ec70f3

Please sign in to comment.