316 lines
11 KiB
YAML
316 lines
11 KiB
YAML
on:
|
|
release:
|
|
types: [published]
|
|
|
|
name: Upload Release Asset
|
|
|
|
jobs:
|
|
linux64-cli:
|
|
name: Linux64 CLI static
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: install prerequisites
|
|
run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man jq
|
|
|
|
- name: configure
|
|
run: CLI_ONLY=1 ./configure
|
|
|
|
- name: make
|
|
run: nproc && make -j$(nproc) && make static && mv -f dvdisaster-static dvdisaster
|
|
|
|
- name: check executable
|
|
run: |
|
|
./dvdisaster --version && ./dvdisaster --version | grep -q -e UNKNOWN -e dirty || true
|
|
file dvdisaster && file dvdisaster | grep -q 'ELF 64' && file dvdisaster | grep -q 'statically linked'
|
|
|
|
- name: build dist
|
|
id: dist
|
|
run: |
|
|
archive=dvdisaster-$(echo "${{ github.ref }}" | grep -Eo '[^/]+$')-linux64-static-cli-only.zip
|
|
upload_url=$(jq -r '.release.upload_url' < $GITHUB_EVENT_PATH)
|
|
echo "Archive name is $archive"
|
|
echo "Upload URL is $upload_url"
|
|
echo "::set-output name=archive::$archive"
|
|
echo "::set-output name=upload_url::$upload_url"
|
|
mkdir dist
|
|
man -t documentation/dvdisaster.en.1 | ps2pdf - dist/dvdisaster.pdf
|
|
mv dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
|
mv dist ${archive/.zip/}
|
|
zip -9r $archive ${archive/.zip/}
|
|
|
|
- name: Upload Release Asset
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.dist.outputs.upload_url }}
|
|
asset_path: ./${{ steps.dist.outputs.archive }}
|
|
asset_name: ${{ steps.dist.outputs.archive }}
|
|
asset_content_type: application/zip
|
|
|
|
win64-gui:
|
|
name: Windows64 GUI
|
|
runs-on: windows-2016
|
|
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW64
|
|
update: false
|
|
install: git diffutils make pkg-config mingw-w64-x86_64-gtk2 mingw-w64-x86_64-glib2 mingw-w64-x86_64-gcc mingw-w64-x86_64-ghostscript mingw-w64-x86_64-jq mingw-w64-x86_64-ntldd-git man zip
|
|
|
|
- run: git config --global core.autocrlf input
|
|
shell: bash
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: configure
|
|
run: ./configure
|
|
|
|
- name: make
|
|
run: nproc && make -j$(nproc)
|
|
|
|
- name: check executable
|
|
run: |
|
|
./dvdisaster.exe --version && ./dvdisaster --version | grep -q -e UNKNOWN -e dirty || true
|
|
file dvdisaster.exe && file dvdisaster.exe | grep -q 'x86-64, for MS Windows'
|
|
|
|
- name: build dist
|
|
id: dist
|
|
run: |
|
|
archive=dvdisaster-$(echo "${{ github.ref }}" | grep -Eo '[^/]+$')-win64.zip
|
|
upload_url=$(jq -r '.release.upload_url' < $GITHUB_EVENT_PATH)
|
|
echo "Archive name is $archive"
|
|
echo "Upload URL is $upload_url"
|
|
echo "::set-output name=archive::$archive"
|
|
echo "::set-output name=upload_url::$upload_url"
|
|
mkdir dist
|
|
mkdir -p dist/lib dist/locale dist/share/themes
|
|
cp -vr locale/*/ dist/locale/
|
|
cp -vr $MINGW_PREFIX/share/themes/MS-Windows dist/share/themes/
|
|
cp -vr $MINGW_PREFIX/lib/gtk-2.0 dist/lib/
|
|
find dist -type f -name "*.a" -delete
|
|
rm -rf dist/lib/gtk-2.0/include
|
|
ntldd -R dvdisaster
|
|
for i in $(ntldd -R dvdisaster | awk '/mingw/ {print $3}' | tr \\\\ / | grep -Eo '[^/]+$')
|
|
do
|
|
test -e $MINGW_PREFIX/bin/$i && cp -va $MINGW_PREFIX/bin/$i dist/
|
|
done
|
|
man -t documentation/dvdisaster.en.1 | ps2pdf - dist/dvdisaster.pdf
|
|
mv dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
|
mv dist ${archive/.zip/}
|
|
zip -9r $archive ${archive/.zip/}
|
|
|
|
- name: Upload Release Asset
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.dist.outputs.upload_url }}
|
|
asset_path: ./${{ steps.dist.outputs.archive }}
|
|
asset_name: ${{ steps.dist.outputs.archive }}
|
|
asset_content_type: application/zip
|
|
|
|
win32-gui:
|
|
name: Windows32 GUI
|
|
runs-on: windows-2016
|
|
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW32
|
|
update: false
|
|
install: git diffutils make pkg-config mingw-w64-i686-gtk2 mingw-w64-i686-glib2 mingw-w64-i686-gcc mingw-w64-i686-ghostscript mingw-w64-i686-jq mingw-w64-i686-ntldd-git man zip
|
|
|
|
- run: git config --global core.autocrlf input
|
|
shell: bash
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: configure
|
|
run: ./configure
|
|
|
|
- name: make
|
|
run: nproc && make -j$(nproc)
|
|
|
|
- name: check executable
|
|
run: |
|
|
./dvdisaster.exe --version && ./dvdisaster --version | grep -q -e UNKNOWN -e dirty || true
|
|
file dvdisaster.exe && file dvdisaster.exe | grep -q '386, for MS Windows'
|
|
|
|
- name: build dist
|
|
id: dist
|
|
run: |
|
|
set -x
|
|
set +o pipefail
|
|
archive=dvdisaster-$(echo "${{ github.ref }}" | grep -Eo '[^/]+$')-win32.zip
|
|
upload_url=$(jq -r '.release.upload_url' < $GITHUB_EVENT_PATH)
|
|
echo "Archive name is $archive"
|
|
echo "Upload URL is $upload_url"
|
|
echo "::set-output name=archive::$archive"
|
|
echo "::set-output name=upload_url::$upload_url"
|
|
mkdir dist
|
|
mkdir -p dist/lib dist/locale dist/share/themes
|
|
cp -vr locale/*/ dist/locale/
|
|
cp -vr $MINGW_PREFIX/share/themes/MS-Windows dist/share/themes/
|
|
cp -vr $MINGW_PREFIX/lib/gtk-2.0 dist/lib/
|
|
find dist -type f -name "*.a" -delete
|
|
rm -rf dist/lib/gtk-2.0/include
|
|
ntldd -R dvdisaster
|
|
for i in $(ntldd -R dvdisaster | awk '/mingw/ {print $3}' | tr \\\\ / | grep -Eo '[^/]+$')
|
|
do
|
|
test -e $MINGW_PREFIX/bin/$i && cp -va $MINGW_PREFIX/bin/$i dist/
|
|
done
|
|
man -t documentation/dvdisaster.en.1 | ps2pdf - dist/dvdisaster.pdf
|
|
mv dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
|
mv dist ${archive/.zip/}
|
|
zip -9r $archive ${archive/.zip/}
|
|
|
|
- name: Upload Release Asset
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.dist.outputs.upload_url }}
|
|
asset_path: ./${{ steps.dist.outputs.archive }}
|
|
asset_name: ${{ steps.dist.outputs.archive }}
|
|
asset_content_type: application/zip
|
|
|
|
win64-cli:
|
|
name: Windows64 CLI
|
|
runs-on: windows-2016
|
|
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW64
|
|
update: false
|
|
install: git diffutils make pkg-config mingw-w64-x86_64-glib2 mingw-w64-x86_64-gcc mingw-w64-x86_64-ghostscript mingw-w64-x86_64-jq mingw-w64-x86_64-ntldd-git man zip
|
|
|
|
- run: git config --global core.autocrlf input
|
|
shell: bash
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: configure
|
|
run: CLI_ONLY=1 ./configure
|
|
|
|
- name: make
|
|
run: nproc && make -j$(nproc)
|
|
|
|
- name: check executable
|
|
run: |
|
|
./dvdisaster.exe --version && ./dvdisaster --version | grep -q -e UNKNOWN -e dirty || true
|
|
file dvdisaster.exe && file dvdisaster.exe | grep -q 'x86-64, for MS Windows'
|
|
|
|
- name: build dist
|
|
id: dist
|
|
run: |
|
|
archive=dvdisaster-$(echo "${{ github.ref }}" | grep -Eo '[^/]+$')-win64-cli-only.zip
|
|
upload_url=$(jq -r '.release.upload_url' < $GITHUB_EVENT_PATH)
|
|
echo "Archive name is $archive"
|
|
echo "Upload URL is $upload_url"
|
|
echo "::set-output name=archive::$archive"
|
|
echo "::set-output name=upload_url::$upload_url"
|
|
mkdir dist
|
|
mkdir -p dist/locale
|
|
cp -vr locale/*/ dist/locale/
|
|
ntldd -R dvdisaster
|
|
for i in $(ntldd -R dvdisaster | awk '/mingw/ {print $3}' | tr \\\\ / | grep -Eo '[^/]+$')
|
|
do
|
|
test -e $MINGW_PREFIX/bin/$i && cp -va $MINGW_PREFIX/bin/$i dist/
|
|
done
|
|
man -t documentation/dvdisaster.en.1 | ps2pdf - dist/dvdisaster.pdf
|
|
mv dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
|
mv dist ${archive/.zip/}
|
|
zip -9r $archive ${archive/.zip/}
|
|
|
|
- name: Upload Release Asset
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.dist.outputs.upload_url }}
|
|
asset_path: ./${{ steps.dist.outputs.archive }}
|
|
asset_name: ${{ steps.dist.outputs.archive }}
|
|
asset_content_type: application/zip
|
|
|
|
win32-cli:
|
|
name: Windows32 CLI
|
|
runs-on: windows-2016
|
|
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW32
|
|
update: false
|
|
install: git diffutils make pkg-config mingw-w64-i686-glib2 mingw-w64-i686-gcc mingw-w64-i686-ghostscript mingw-w64-i686-jq mingw-w64-i686-ntldd-git man zip
|
|
|
|
- run: git config --global core.autocrlf input
|
|
shell: bash
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: configure
|
|
run: CLI_ONLY=1 ./configure
|
|
|
|
- name: make
|
|
run: nproc && make -j$(nproc)
|
|
|
|
- name: check executable
|
|
run: |
|
|
./dvdisaster.exe --version && ./dvdisaster --version | grep -q -e UNKNOWN -e dirty || true
|
|
file dvdisaster.exe && file dvdisaster.exe | grep -q '386, for MS Windows'
|
|
|
|
- name: build dist
|
|
id: dist
|
|
run: |
|
|
archive=dvdisaster-$(echo "${{ github.ref }}" | grep -Eo '[^/]+$')-win32-cli-only.zip
|
|
upload_url=$(jq -r '.release.upload_url' < $GITHUB_EVENT_PATH)
|
|
echo "Archive name is $archive"
|
|
echo "Upload URL is $upload_url"
|
|
echo "::set-output name=archive::$archive"
|
|
echo "::set-output name=upload_url::$upload_url"
|
|
mkdir dist
|
|
mkdir -p dist/locale
|
|
cp -vr locale/*/ dist/locale/
|
|
ntldd -R dvdisaster
|
|
for i in $(ntldd -R dvdisaster | awk '/mingw/ {print $3}' | tr \\\\ / | grep -Eo '[^/]+$')
|
|
do
|
|
test -e $MINGW_PREFIX/bin/$i && cp -va $MINGW_PREFIX/bin/$i dist/
|
|
done
|
|
man -t documentation/dvdisaster.en.1 | ps2pdf - dist/dvdisaster.pdf
|
|
mv dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
|
mv dist ${archive/.zip/}
|
|
zip -9r $archive ${archive/.zip/}
|
|
|
|
- name: Upload Release Asset
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.dist.outputs.upload_url }}
|
|
asset_path: ./${{ steps.dist.outputs.archive }}
|
|
asset_name: ${{ steps.dist.outputs.archive }}
|
|
asset_content_type: application/zip
|