mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-04-12 06:17:38 -05:00
76 lines
2.2 KiB
YAML
76 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# build at least once a month
|
|
- cron: '0 0 1 * *'
|
|
|
|
jobs:
|
|
build-and-test:
|
|
strategy:
|
|
matrix:
|
|
ARCH: [x86_64, i386]
|
|
BUILD_TYPE: [appimage, coverage]
|
|
fail-fast: false
|
|
|
|
name: ${{ matrix.BUILD_TYPE }} ${{ matrix.ARCH }}
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
ARCH: ${{ matrix.ARCH }}
|
|
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install dependencies (x86_64)
|
|
if: matrix.ARCH == 'x86_64'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcovr libmagic-dev libjpeg-dev libpng-dev libboost-filesystem-dev libboost-regex-dev cimg-dev
|
|
|
|
- name: Install dependencies (i386)
|
|
if: matrix.ARCH == 'i386'
|
|
run: |
|
|
sudo dpkg --add-architecture i386
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcovr libmagic-dev:i386 libjpeg-dev:i386 libpng-dev:i386 libboost-filesystem-dev:i386 libboost-regex-dev:i386 cimg-dev gcc-multilib g++-multilib libfuse2:i386
|
|
|
|
- name: Test coverage
|
|
run: bash -ex ci/test-coverage.sh
|
|
if: matrix.BUILD_TYPE == 'coverage'
|
|
|
|
- name: Build, test and build AppImage
|
|
run: bash -ex ci/build.sh
|
|
if: matrix.BUILD_TYPE != 'coverage'
|
|
|
|
- name: Archive artifacts
|
|
uses: actions/upload-artifact@v2
|
|
if: matrix.BUILD_TYPE != 'coverage'
|
|
with:
|
|
name: AppImage
|
|
path: linuxdeploy*.AppImage*
|
|
|
|
upload:
|
|
name: Create release and upload artifacts
|
|
needs:
|
|
- build-and-test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v2
|
|
- name: Inspect directory after downloading artifacts
|
|
run: ls -alFR
|
|
- name: Create release and upload artifacts
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
|
|
chmod +x pyuploadtool-x86_64.AppImage
|
|
./pyuploadtool-x86_64.AppImage **/linuxdeploy*.AppImage*
|