200 lines
7.4 KiB
YAML
200 lines
7.4 KiB
YAML
name: autobuild
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
mac:
|
|
runs-on: macos-11
|
|
strategy:
|
|
matrix:
|
|
ui: [cli, gui]
|
|
include:
|
|
- ui: cli
|
|
clionly: --with-gui=no
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: install prerequisites
|
|
env:
|
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
|
run: brew install ghostscript glib gdk-pixbuf dylibbundler create-dmg
|
|
- name: install prerequisites (GUI)
|
|
if: matrix.ui == 'gui'
|
|
env:
|
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
|
run: brew install gtk+
|
|
- name: configure
|
|
run: |
|
|
set +x
|
|
./configure ${{ matrix.clionly }} --with-werror
|
|
- name: make
|
|
run: make -j$(sysctl -n hw.ncpu || 2)
|
|
- name: check executability
|
|
run: ./dvdisaster --version
|
|
- name: check executable (GUI)
|
|
if: matrix.ui == 'gui'
|
|
run: |
|
|
./dvdisaster --version
|
|
if ./dvdisaster --version | grep NOGUI; then exit 1; fi
|
|
- name: check executable (CLI)
|
|
if: matrix.ui == 'cli'
|
|
run: |
|
|
./dvdisaster --version
|
|
./dvdisaster --version | grep NOGUI
|
|
- name: build dist
|
|
run: ./.github/workflows/make-mac-app.sh ${{ github.ref }}
|
|
id: dist
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: ${{ steps.dist.outputs.archive }}
|
|
draft: true
|
|
|
|
win:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
arch: [x86_64, i686]
|
|
ui: [cli, gui]
|
|
include:
|
|
- arch: x86_64
|
|
msystem: MINGW64
|
|
grep: x86-64
|
|
- arch: i686
|
|
msystem: MINGW32
|
|
grep: 386
|
|
- ui: cli
|
|
clionly: --with-gui=no
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: ${{ matrix.msystem }}
|
|
update: false
|
|
install: git diffutils make pkg-config mingw-w64-${{ matrix.arch }}-glib2 mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-ghostscript mingw-w64-${{ matrix.arch }}-ntldd-git man zip
|
|
- name: install GUI prereqs
|
|
if: matrix.ui == 'gui'
|
|
run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk2
|
|
- name: git config
|
|
run: git config --global core.autocrlf input
|
|
shell: bash
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: configure
|
|
run: ./configure ${{ matrix.clionly }}
|
|
- name: make
|
|
run: nproc && make -j$(nproc)
|
|
- name: check executable
|
|
run: |
|
|
./dvdisaster.exe --version
|
|
file dvdisaster.exe
|
|
if ./dvdisaster.exe --version | grep dirty; then exit 1; fi
|
|
file dvdisaster.exe | grep -q '${{ matrix.grep }}, for MS Windows'
|
|
- name: check executable (GUI)
|
|
if: matrix.ui == 'gui'
|
|
run: if ./dvdisaster.exe --version | grep NOGUI; then exit 1; fi
|
|
- name: check executable (CLI)
|
|
if: matrix.ui == 'cli'
|
|
run: ./dvdisaster.exe --version | grep NOGUI
|
|
- name: prepare dist
|
|
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
|
id: dist
|
|
- name: check executability of dist from cmd.exe
|
|
shell: cmd
|
|
run: |
|
|
cd dist
|
|
dvdisaster.exe --version
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: ${{ steps.dist.outputs.archive }}
|
|
draft: true
|
|
|
|
linux64-cli:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: install prerequisites
|
|
run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man
|
|
- name: configure
|
|
run: ./configure --with-gui=no
|
|
- name: make
|
|
run: nproc && make -j$(nproc) && make static && mv -f dvdisaster-static dvdisaster
|
|
- name: check executable
|
|
run: |
|
|
./dvdisaster --version && ./dvdisaster --version | grep -q dirty || true
|
|
file dvdisaster && file dvdisaster | grep -q 'ELF 64' && file dvdisaster | grep -q 'statically linked'
|
|
|
|
- name: build dist
|
|
run: ./.github/workflows/make-dist.sh ${{ github.ref }}
|
|
id: dist
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: ${{ steps.dist.outputs.archive }}
|
|
draft: true
|
|
|
|
linux64-appimage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: install prerequisites on host
|
|
run: sudo apt-get update && sudo apt-get install -y fuse
|
|
- name: docker
|
|
run: |
|
|
mkdir -p /tmp/dist
|
|
docker run --device /dev/fuse --privileged --name uu -d -v $PWD:/code -v /tmp/dist:/dist ubuntu:14.04 sleep 1800
|
|
- name: install prerequisites in docker
|
|
run: docker exec uu sh -c 'sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man libgtk2.0-dev gtk2-engines-pixbuf gtk2-engines pkg-config gnome-themes-standard fuse'
|
|
- name: configure in docker
|
|
run: docker exec uu sh -c 'cd /code && ./configure --prefix=/usr'
|
|
- name: make in docker
|
|
run: docker exec uu sh -c 'make -C /code -j$(nproc) && make -C /code'
|
|
- name: make install in docker
|
|
run: docker exec uu sh -c 'cd /code && touch documentation/user-manual/manual.pdf && make install DESTDIR=/dist'
|
|
- name: copy things to dist in docker
|
|
run: docker exec uu sh -c 'install -d /dist/usr/lib/gtk-2.0 && cp -va $(pkg-config --variable=libdir gtk+-2.0)/gtk-2.0/$(pkg-config --variable=gtk_binary_version gtk+-2.0)/* /dist/usr/lib/gtk-2.0'
|
|
- name: build appimage in docker
|
|
run: |
|
|
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
|
chmod 755 linuxdeploy-x86_64.AppImage
|
|
docker exec -e LINUXDEPLOY_OUTPUT_VERSION=$(echo "${{ github.ref }}" | grep -Eo '[^/]+$') -e ARCH=x86_64 uu sh -c 'cd /code && ./linuxdeploy-x86_64.AppImage -d contrib/dvdisaster.desktop -i contrib/dvdisaster64.png -i contrib/dvdisaster48.png -i contrib/dvdisaster32.png -i contrib/dvdisaster16.png --icon-filename dvdisaster --custom-apprun=contrib/AppRun.sh --appdir /dist/ --output appimage'
|
|
- name: fix perms
|
|
run: docker exec uu sh -c "chown -R $UID /dist /code/*.AppImage"
|
|
- name: apply glib workaround
|
|
env:
|
|
ARCH: x86_64
|
|
run: |
|
|
wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
|
chmod 755 appimagetool-x86_64.AppImage
|
|
exe=$(ls -1 dvdisaster*.AppImage)
|
|
chmod 755 $exe
|
|
./$exe --appimage-extract
|
|
rm -vf $exe
|
|
env LINUXDEPLOY_OUTPUT_VERSION=$(echo "${{ github.ref }}" | grep -Eo '[^/]+$') ./appimagetool-x86_64.AppImage -v squashfs-root
|
|
mv -v dvdisaster*AppImage $exe
|
|
chmod 755 $exe
|
|
- name: test appimage
|
|
id: dist
|
|
run: |
|
|
chmod 755 dvdisaster*.AppImage && ./dvdisaster*.AppImage --version
|
|
archive=$(ls -1 dvdisaster*.AppImage)
|
|
echo "archive=$archive" >> "$GITHUB_OUTPUT"
|
|
echo "appimage is <$archive>"
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: ${{ steps.dist.outputs.archive }}
|
|
draft: true
|