Assign DR value before function return for easier debugging #106
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: Ubuntu and Windows CI | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
os: [ubuntu, windows] | |
include: | |
- os: windows | |
shell: msys2 | |
- os: ubuntu | |
shell: bash | |
defaults: | |
run: | |
shell: ${{ matrix.shell }} {0} | |
steps: | |
- name: Install Ubuntu dependencies | |
if: matrix.os == 'ubuntu' | |
run: | | |
sudo apt-get -qq update | |
sudo apt-get -qq install build-essential pkg-config libgtk2.0-dev libgtk-3-dev | |
- name: Install Windows dependencies | |
if: matrix.os == 'windows' | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: >- | |
mingw-w64-x86_64-toolchain make | |
mingw-w64-x86_64-gtk2 mingw-w64-x86_64-gtk3 | |
- uses: actions/checkout@v2 | |
- name: Install Deadbeef headers | |
run: | | |
wget -O headers.tar.bz2 http://sourceforge.net/projects/deadbeef/files/staticdeps/ddb-headers-latest.tar.bz2/download | |
mkdir "${HOME}/ddb_install" | |
tar xf headers.tar.bz2 -C "${HOME}/ddb_install" | |
- name: Install this | |
run: | | |
CPPFLAGS="-I${HOME}/ddb_install" make install DESTDIR=../release PREFIX="" RPATH='\$$ORIGIN/lib' | |
CPPFLAGS="-I${HOME}/ddb_install" make install DESTDIR=../release PREFIX="" RPATH='\$$ORIGIN/lib' GTK=2 | |
- name: Upload installed build | |
uses: actions/upload-artifact@master | |
with: | |
name: release_${{ matrix.os }} | |
path: release/ | |
if-no-files-found: error | |
publish: | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
os: [ubuntu, windows] | |
include: | |
- os: windows | |
shell: msys2 | |
- os: ubuntu | |
shell: bash | |
defaults: | |
run: | |
shell: ${{ matrix.shell }} {0} | |
needs: build | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- if: matrix.os == 'windows' | |
uses: msys2/setup-msys2@v2 | |
with: | |
install: zip | |
- name: Fetch release | |
uses: actions/download-artifact@master | |
with: | |
name: release_${{ matrix.os }} | |
path: release/ | |
- name: Define release | |
id: define_release | |
run: | | |
echo "::set-output name=TAG::v$(date +'%Y_%m_%d_h%H')" | |
echo "::set-output name=NAME::deadbeef_dr_meter_${RUNNER_OS}_$(echo $GITHUB_SHA | cut -c1-7)" | |
- name: Pack Ubuntu release | |
if: matrix.os == 'ubuntu' | |
run: tar -cf ${{ steps.define_release.outputs.NAME }}.tar.gz -C release/ . | |
- name: Pack Windows release | |
if: matrix.os == 'windows' | |
run: zip -rj ${{ steps.define_release.outputs.NAME }}.zip release/* | |
- name: Publish release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "${{ steps.define_release.outputs.NAME }}*" | |
commit: ${{ github.sha }} | |
tag: ${{ steps.define_release.outputs.TAG }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
artifactErrorsFailBuild: true |