Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

actions: separate yml for re-running

shun-iwasawa9f7051922eb2
diff --git a/.github/workflows/workflow_linux.yml b/.github/workflows/workflow_linux.yml
new file mode 100644
index 000000000..06fb4c9a6
--- /dev/null
+++ b/.github/workflows/workflow_linux.yml
@@ -0,0 +1,89 @@
+name: Linux Build
+
+on: [push, pull_request]
+
+jobs:
+ Ubuntu:
+ runs-on: ubuntu-18.04
+ strategy:
+ matrix:
+ compiler: [gcc, clang]
+ include:
+ - compiler: gcc
+ cc: gcc
+ cxx: g++
+ - compiler: clang
+ cc: clang
+ cxx: clang++
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install libraries
+ run: |
+ sudo apt-get update
+ sudo apt-get install build-essential cmake pkg-config ninja-build ccache libboost-all-dev qt5-default qtbase5-dev libqt5svg5-dev qtscript5-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev qtmultimedia5-dev libqt5multimedia5-plugins libsuperlu-dev liblz4-dev libusb-1.0-0-dev liblzo2-dev libpng-dev libjpeg-dev libglew-dev freeglut3-dev libfreetype6-dev libjson-c-dev qtwayland5 libmypaint-dev
+
+ - uses: actions/cache@v1
+ with:
+ path: /home/runner/.ccache
+ key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
+ restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
+
+ - name: Build libtiff
+ run: |
+ cd thirdparty/tiff-4.0.3
+ CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-jbig
+ make -j $(nproc)
+
+ - name: Build
+ run: |
+ cd toonz
+ mkdir build
+ cd build
+ cmake ../sources -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_C_COMPILER=${{ matrix.cc }}
+ ninja
+
+ - name: Create Artifact
+ run: |
+ cd toonz/build
+ sudo ninja install
+
+ mkdir -p appdir/usr
+ cp -r /opt/opentoonz/* appdir/usr
+ cp appdir/usr/share/applications/*.desktop appdir
+ cp appdir/usr/share/icons/hicolor/*/apps/*.png appdir
+
+ mkdir artifact
+ mv appdir/usr/share/opentoonz/stuff artifact/portablestuff
+ rmdir appdir/usr/share/opentoonz
+
+ wget -q -c 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage'
+ wget -q -c 'https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage'
+ wget -q -c 'https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage'
+ chmod 755 linuxdeploy-x86_64.AppImage
+ chmod 755 linuxdeploy-plugin-qt-x86_64.AppImage
+ chmod 755 linuxdeploy-plugin-appimage-x86_64.AppImage
+
+ cat << EOF > apprun.sh
+ #!/usr/bin/env bash
+ exec "\${APPDIR}/usr/bin/OpenToonz"
+ EOF
+ chmod 755 apprun.sh
+
+ export LD_LIBRARY_PATH='appdir/usr/lib/opentoonz'
+ ./linuxdeploy-x86_64.AppImage --appdir=appdir --plugin=qt --output=appimage --custom-apprun=apprun.sh \
+ --executable=appdir/usr/bin/lzocompress \
+ --executable=appdir/usr/bin/lzodecompress \
+ --executable=appdir/usr/bin/tcleanup \
+ --executable=appdir/usr/bin/tcomposer \
+ --executable=appdir/usr/bin/tconverter \
+ --executable=appdir/usr/bin/tfarmcontroller \
+ --executable=appdir/usr/bin/tfarmserver
+ mv OpenToonz*.AppImage artifact/OpenToonz.AppImage
+ ARTIFACT_NAME=Opentoonz-${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
+ mv artifact ${ARTIFACT_NAME}
+ tar zcf ${ARTIFACT_NAME}.tar.gz ${ARTIFACT_NAME}
+
+ - uses: actions/upload-artifact@v1
+ with:
+ name: Opentoonz-${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
+ path: toonz/build/Opentoonz-${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}.tar.gz
diff --git a/.github/workflows/workflow_macos.yml b/.github/workflows/workflow_macos.yml
new file mode 100644
index 000000000..ec218628b
--- /dev/null
+++ b/.github/workflows/workflow_macos.yml
@@ -0,0 +1,67 @@
+name: MacOS Build
+
+on: [push, pull_request]
+
+jobs:
+ macOS:
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Install libraries
+ run: |
+ checkPkgAndInstall()
+ {
+ while [ $# -ne 0 ]
+ do
+ if brew ls --versions $1 ; then
+ brew upgrade $1
+ else
+ brew install $1
+ fi
+ shift
+ done
+ }
+ brew update
+ checkPkgAndInstall pkg-config glew lz4 libjpeg libpng lzo qt boost libusb libmypaint ccache
+ curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/284557d4f5b29a7b9fb48bf8a54cf8a72d26c5eb/Formula/ninja.rb
+ brew install ./ninja.rb
+
+ - uses: actions/cache@v1
+ with:
+ path: /Users/runner/.ccache
+ key: ${{ runner.os }}-${{ github.sha }}
+ restore-keys: ${{ runner.os }}-
+
+ - name: Build libtiff
+ run: |
+ export PATH="/usr/local/opt/ccache/libexec:$PATH"
+ cd thirdparty/tiff-4.0.3
+ CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-lzma
+ make -j $(nproc)
+
+ - name: Build
+ run: |
+ cd toonz
+ mkdir build
+ cd build
+ cmake ../sources -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQT_PATH='/usr/local/opt/qt/lib'
+ ninja -w dupbuild=warn
+
+ - name: Create Artifact
+ run: |
+ cd toonz/build/toonz
+ cp -pr ../../../stuff OpenToonz.app/portablestuff
+ /usr/local/opt/qt/bin/macdeployqt OpenToonz.app -dmg -verbose=1 -always-overwrite \
+ -executable=OpenToonz.app/Contents/MacOS/lzocompress \
+ -executable=OpenToonz.app/Contents/MacOS/lzodecompress \
+ -executable=OpenToonz.app/Contents/MacOS/tcleanup \
+ -executable=OpenToonz.app/Contents/MacOS/tcomposer \
+ -executable=OpenToonz.app/Contents/MacOS/tconverter \
+ -executable=OpenToonz.app/Contents/MacOS/tfarmcontroller \
+ -executable=OpenToonz.app/Contents/MacOS/tfarmserver
+
+ - uses: actions/upload-artifact@v1
+ with:
+ name: Opentoonz-${{ runner.os }}-${{ github.sha }}
+ path: toonz/build/toonz/OpenToonz.dmg
diff --git a/.github/workflows/build.yml b/.github/workflows/workflow_windows.yml
similarity index 58%
rename from .github/workflows/build.yml
rename to .github/workflows/workflow_windows.yml
index 5783c5876..430c83d73 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/workflow_windows.yml
@@ -1,156 +1,8 @@
-name: Build
+name: Windows Build
on: [push, pull_request]
jobs:
- Ubuntu:
- runs-on: ubuntu-18.04
- strategy:
- matrix:
- compiler: [gcc, clang]
- include:
- - compiler: gcc
- cc: gcc
- cxx: g++
- - compiler: clang
- cc: clang
- cxx: clang++
- steps:
- - uses: actions/checkout@v2
- - name: Install libraries
- run: |
- sudo apt-get update
- sudo apt-get install build-essential cmake pkg-config ninja-build ccache libboost-all-dev qt5-default qtbase5-dev libqt5svg5-dev qtscript5-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev qtmultimedia5-dev libqt5multimedia5-plugins libsuperlu-dev liblz4-dev libusb-1.0-0-dev liblzo2-dev libpng-dev libjpeg-dev libglew-dev freeglut3-dev libfreetype6-dev libjson-c-dev qtwayland5 libmypaint-dev
-
- - uses: actions/cache@v1
- with:
- path: /home/runner/.ccache
- key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
- restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
-
- - name: Build libtiff
- run: |
- cd thirdparty/tiff-4.0.3
- CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-jbig
- make -j $(nproc)
-
- - name: Build
- run: |
- cd toonz
- mkdir build
- cd build
- cmake ../sources -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_C_COMPILER=${{ matrix.cc }}
- ninja
-
- - name: Create Artifact
- run: |
- cd toonz/build
- sudo ninja install
-
- mkdir -p appdir/usr
- cp -r /opt/opentoonz/* appdir/usr
- cp appdir/usr/share/applications/*.desktop appdir
- cp appdir/usr/share/icons/hicolor/*/apps/*.png appdir
-
- mkdir artifact
- mv appdir/usr/share/opentoonz/stuff artifact/portablestuff
- rmdir appdir/usr/share/opentoonz
-
- wget -q -c 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage'
- wget -q -c 'https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage'
- wget -q -c 'https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage'
- chmod 755 linuxdeploy-x86_64.AppImage
- chmod 755 linuxdeploy-plugin-qt-x86_64.AppImage
- chmod 755 linuxdeploy-plugin-appimage-x86_64.AppImage
-
- cat << EOF > apprun.sh
- #!/usr/bin/env bash
- exec "\${APPDIR}/usr/bin/OpenToonz"
- EOF
- chmod 755 apprun.sh
-
- export LD_LIBRARY_PATH='appdir/usr/lib/opentoonz'
- ./linuxdeploy-x86_64.AppImage --appdir=appdir --plugin=qt --output=appimage --custom-apprun=apprun.sh \
- --executable=appdir/usr/bin/lzocompress \
- --executable=appdir/usr/bin/lzodecompress \
- --executable=appdir/usr/bin/tcleanup \
- --executable=appdir/usr/bin/tcomposer \
- --executable=appdir/usr/bin/tconverter \
- --executable=appdir/usr/bin/tfarmcontroller \
- --executable=appdir/usr/bin/tfarmserver
- mv OpenToonz*.AppImage artifact/OpenToonz.AppImage
- ARTIFACT_NAME=Opentoonz-${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
- mv artifact ${ARTIFACT_NAME}
- tar zcf ${ARTIFACT_NAME}.tar.gz ${ARTIFACT_NAME}
-
- - uses: actions/upload-artifact@v1
- with:
- name: Opentoonz-${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
- path: toonz/build/Opentoonz-${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}.tar.gz
-
- macOS:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v2
-
- - name: Install libraries
- run: |
- checkPkgAndInstall()
- {
- while [ $# -ne 0 ]
- do
- if brew ls --versions $1 ; then
- brew upgrade $1
- else
- brew install $1
- fi
- shift
- done
- }
- brew update
- checkPkgAndInstall pkg-config glew lz4 libjpeg libpng lzo qt boost libusb libmypaint ccache
- curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/284557d4f5b29a7b9fb48bf8a54cf8a72d26c5eb/Formula/ninja.rb
- brew install ./ninja.rb
-
- - uses: actions/cache@v1
- with:
- path: /Users/runner/.ccache
- key: ${{ runner.os }}-${{ github.sha }}
- restore-keys: ${{ runner.os }}-
-
- - name: Build libtiff
- run: |
- export PATH="/usr/local/opt/ccache/libexec:$PATH"
- cd thirdparty/tiff-4.0.3
- CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-lzma
- make -j $(nproc)
-
- - name: Build
- run: |
- cd toonz
- mkdir build
- cd build
- cmake ../sources -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQT_PATH='/usr/local/opt/qt/lib'
- ninja -w dupbuild=warn
-
- - name: Create Artifact
- run: |
- cd toonz/build/toonz
- cp -pr ../../../stuff OpenToonz.app/portablestuff
- /usr/local/opt/qt/bin/macdeployqt OpenToonz.app -dmg -verbose=1 -always-overwrite \
- -executable=OpenToonz.app/Contents/MacOS/lzocompress \
- -executable=OpenToonz.app/Contents/MacOS/lzodecompress \
- -executable=OpenToonz.app/Contents/MacOS/tcleanup \
- -executable=OpenToonz.app/Contents/MacOS/tcomposer \
- -executable=OpenToonz.app/Contents/MacOS/tconverter \
- -executable=OpenToonz.app/Contents/MacOS/tfarmcontroller \
- -executable=OpenToonz.app/Contents/MacOS/tfarmserver
-
- - uses: actions/upload-artifact@v1
- with:
- name: Opentoonz-${{ runner.os }}-${{ github.sha }}
- path: toonz/build/toonz/OpenToonz.dmg
-
Windows:
runs-on: windows-2019
env: