Merge pull request #621 from manongjohn/setup_build_caches

Setup ccache for Action builds
This commit is contained in:
manongjohn 2021-03-20 11:30:25 -04:00 committed by GitHub
commit e472b8c3b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 71 additions and 15 deletions

View file

@ -7,24 +7,52 @@ jobs:
runs-on: ubuntu-16.04 runs-on: ubuntu-16.04
strategy: strategy:
matrix: matrix:
compiler: [ clang ] compiler: [ gcc, clang ]
include: include:
- compiler: gcc
cc: gcc
cxx: g++
- compiler: clang - compiler: clang
cc: clang cc: clang
cxx: clang++ cxx: clang++
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Dependencies - name: Install Dependencies
run: bash ./ci-scripts/linux/tahoma-install.sh run: |
ci-scripts/linux/tahoma-install.sh
sudo apt-get install ccache
- uses: actions/cache@v2
with:
path: |
/home/runner/.ccache
/home/runner/work/tahoma2d/taoma2d/thirdparty/openh264
/home/runner/work/tahoma2d/taoma2d/thirdparty/ffmpeg
/home/runner/work/tahoma2d/taoma2d/thirdparty/ffmpeg_shared
/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 - name: Build ffmpeg
run: bash ./ci-scripts/linux/tahoma-buildffmpeg.sh run: |
export CC="ccache ${{ matrix.cc }}"
export CXX="ccache ${{ matrix.cxx }}"
ci-scripts/linux/tahoma-buildffmpeg.sh
- name: Build OpenCV - name: Build OpenCV
run: bash ./ci-scripts/linux/tahoma-buildopencv.sh run: |
export CC="ccache ${{ matrix.cc }}"
export CXX="ccache ${{ matrix.cxx }}"
ci-scripts/linux/tahoma-buildopencv.sh
- name: Build Tahoma2D - name: Build Tahoma2D
run: bash ./ci-scripts/linux/tahoma-build.sh run: |
export CC="ccache ${{ matrix.cc }}"
export CXX="ccache ${{ matrix.cxx }}"
ci-scripts/linux/tahoma-build.sh
- name: Create Package - name: Create Package
run: bash ./ci-scripts/linux/tahoma-buildpkg.sh 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 - uses: actions/upload-artifact@v1
with: with:
name: Tahoma2D-linux.tar.gz name: Tahoma2D-linux-${{ matrix.compiler }}.tar.gz
path: toonz/build/Tahoma2D-linux.tar.gz path: toonz/build/Tahoma2D-linux-${{ matrix.compiler }}.tar.gz

View file

@ -8,13 +8,32 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Dependencies - name: Install Dependencies
run: bash ./ci-scripts/osx/tahoma-install.sh run: |
ci-scripts/osx/tahoma-install.sh
brew install ccache
mkdir /Users/runner/.ccache
- uses: actions/cache@v2
with:
path: |
/Users/runner/.ccache
/Users/runner/work/tahoma2d/taoma2d/thirdparty/aom
/Users/runner/work/tahoma2d/taoma2d/thirdparty/ffmpeg
/Users/runner/work/tahoma2d/taoma2d/thirdparty/ffmpeg_shared
/Users/runner/work/tahoma2d/taoma2d/thirdparty/opencv
key: ${{ runner.os }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-
- name: Build ffmpeg - name: Build ffmpeg
run: bash ./ci-scripts/osx/tahoma-buildffmpeg.sh run: |
export PATH="/usr/local/opt/ccache/libexec:$PATH"
ci-scripts/osx/tahoma-buildffmpeg.sh
- name: Build OpenCV - name: Build OpenCV
run: bash ./ci-scripts/osx/tahoma-buildopencv.sh run: |
export PATH="/usr/local/opt/ccache/libexec:$PATH"
ci-scripts/osx/tahoma-buildopencv.sh
- name: Build Tahoma2D - name: Build Tahoma2D
run: bash ./ci-scripts/osx/tahoma-build.sh run: |
export PATH="/usr/local/opt/ccache/libexec:$PATH"
ci-scripts/osx/tahoma-build.sh
- name: Create Package - name: Create Package
run: bash ./ci-scripts/osx/tahoma-buildpkg.sh run: bash ./ci-scripts/osx/tahoma-buildpkg.sh
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1

View file

@ -16,14 +16,17 @@ cd ..
echo ">>> Cloning ffmpeg" echo ">>> Cloning ffmpeg"
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cp -R ffmpeg ffmpeg_shared
cd ffmpeg cd ffmpeg_shared
echo "*" >| .gitignore echo "*" >| .gitignore
echo ">>> Configuring to build ffmpeg (shared)" echo ">>> Configuring to build ffmpeg (shared)"
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure --prefix=/usr/local \ ./configure --prefix=/usr/local \
--cc="$CC" \
--cxx="$CXX" \
--toolchain=hardened \ --toolchain=hardened \
--pkg-config-flags="--static" \ --pkg-config-flags="--static" \
--extra-cflags="-I/usr/local/include" \ --extra-cflags="-I/usr/local/include" \
@ -64,10 +67,14 @@ sudo make install
sudo ldconfig sudo ldconfig
echo ">>> Configuring to build ffmpeg (static)" echo ">>> Configuring to build ffmpeg (static)"
cd ../ffmpeg
echo "*" >| .gitignore
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./configure --prefix=/usr/local \ ./configure --prefix=/usr/local \
--cc="$CC" \
--cxx="$CXX" \
--pkg-config-flags="--static" \ --pkg-config-flags="--static" \
--extra-cflags="-I/usr/local/include -static" \ --extra-cflags="-I/usr/local/include -static" \
--extra-ldflags="-L/usr/local/lib -static" \ --extra-ldflags="-L/usr/local/lib -static" \

View file

@ -26,8 +26,9 @@ cd ../..
echo ">>> Cloning ffmpeg" echo ">>> Cloning ffmpeg"
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cp -R ffmpeg ffmpeg_shared
cd ffmpeg cd ffmpeg_shared
echo "*" >| .gitignore echo "*" >| .gitignore
echo ">>> Configuring to build ffmpeg (shared)" echo ">>> Configuring to build ffmpeg (shared)"
@ -73,7 +74,8 @@ echo ">>> Installing ffmpeg (shared)"
sudo make install sudo make install
echo ">>> Configuring to build ffmpeg (static)" echo ">>> Configuring to build ffmpeg (static)"
make clean cd ../ffmpeg
echo "*" >| .gitignore
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export SDKROOT=`xcrun --show-sdk-path` export SDKROOT=`xcrun --show-sdk-path`