tahoma2d/.github/workflows/linux_build.yml

115 lines
4.4 KiB
YAML
Raw Normal View History

name: Tahoma2D Linux Build
on: [push, pull_request]
jobs:
Linux:
runs-on: ubuntu-18.04
strategy:
matrix:
2021-03-20 11:13:35 +13:00
compiler: [ gcc, clang ]
include:
2021-03-20 11:13:35 +13:00
- compiler: gcc
cc: gcc
cxx: g++
- compiler: clang
cc: clang
cxx: clang++
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
2021-03-20 11:13:35 +13:00
run: |
ci-scripts/linux/tahoma-install.sh
sudo apt-get install ccache
- uses: actions/cache@v2
with:
path: |
/home/runner/.ccache
2021-03-20 14:01:07 +13:00
/home/runner/work/tahoma2d/taoma2d/thirdparty/openh264
2021-03-20 11:13:35 +13:00
/home/runner/work/tahoma2d/taoma2d/thirdparty/ffmpeg
/home/runner/work/tahoma2d/taoma2d/thirdparty/opencv
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.compiler }}-
${{ runner.os }}-
- name: Build ffmpeg
2021-03-20 11:13:35 +13:00
run: |
export CC="ccache ${{ matrix.cc }}"
export CXX="ccache ${{ matrix.cxx }}"
ci-scripts/linux/tahoma-buildffmpeg.sh
- name: Build OpenCV
2021-03-20 11:13:35 +13:00
run: |
export CC="ccache ${{ matrix.cc }}"
export CXX="ccache ${{ matrix.cxx }}"
ci-scripts/linux/tahoma-buildopencv.sh
- name: Build libmypaint
run: |
2021-04-19 07:46:28 +12:00
export CC="ccache ${{ matrix.cc }}"
export CXX="ccache ${{ matrix.cxx }}"
ci-scripts/linux/tahoma-buildlibmypaint.sh
- name: Build Tahoma2D
2021-03-20 11:13:35 +13:00
run: |
export CC="ccache ${{ matrix.cc }}"
export CXX="ccache ${{ matrix.cxx }}"
ci-scripts/linux/tahoma-build.sh
- name: Get 3rd Party Apps
run: |
ci-scripts/linux/tahoma-get3rdpartyapps.sh
- name: Create Package
2021-03-20 11:13:35 +13:00
run: |
ci-scripts/linux/tahoma-buildpkg.sh
mv toonz/build/Tahoma2D-linux.tar.gz toonz/build/Tahoma2D-linux-${{ matrix.compiler }}.tar.gz
- uses: actions/upload-artifact@v1
with:
2021-03-20 11:13:35 +13:00
name: Tahoma2D-linux-${{ matrix.compiler }}.tar.gz
path: toonz/build/Tahoma2D-linux-${{ matrix.compiler }}.tar.gz
2021-04-25 00:20:49 +12:00
- name: Get Nightly Release Date
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: |
echo "NIGHTLYDATE=$(date '+%Y-%m-%d')" >> $GITHUB_ENV
echo "NIGHTLYDATETIME=$(date '+%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_ENV
2021-05-29 08:20:57 +12:00
- name: Create/Update Nightlies Tag
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: |
git remote add nightly_repo https://tahoma2d:${{ secrets.TAHOMA2D_TOKEN }}@github.com/tahoma2d/tahoma2d_nightlies.git
git config lfs.https://tahoma2d:${{ secrets.TAHOMA2D_TOKEN }}@github.com/tahoma2d/tahoma2d_nightlies.git.lfs.locksverify false
git fetch --unshallow
git tag -f nightly
git push -f origin nightly
git tag -f nightly-${{ github.sha }}
git config --unset-all http.https://github.com/.extraheader
git push -f nightly_repo nightly-${{ github.sha }}
git remote rm nightly_repo
2021-04-25 00:20:49 +12:00
- name: Update Latest Nightly Release
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: false
artifacts: toonz/build/Tahoma2D-linux-${{ matrix.compiler }}.tar.gz
artifactContentType: "raw"
body: ${{ github.event.head_commit.message }}
name: Lastest Nightly ${{ env.NIGHTLYDATE }}
prerelease: true
replacesArtifacts: true
tag: nightly
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Nightlies Release
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: false
artifacts: toonz/build/Tahoma2D-linux-${{ matrix.compiler }}.tar.gz
artifactContentType: "raw"
body: ${{ github.event.head_commit.message }}
name: ${{ env.NIGHTLYDATETIME }}
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
2021-04-25 00:20:49 +12:00
owner: tahoma2d
prerelease: true
replacesArtifacts: true
repo: tahoma2d_nightlies
tag: nightly-${{ github.sha }}
token: ${{ secrets.TAHOMA2D_TOKEN }}