aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/depends.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/depends.yml')
-rw-r--r--.github/workflows/depends.yml39
1 files changed, 29 insertions, 10 deletions
diff --git a/.github/workflows/depends.yml b/.github/workflows/depends.yml
index d5509705d..9385338de 100644
--- a/.github/workflows/depends.yml
+++ b/.github/workflows/depends.yml
@@ -7,11 +7,19 @@ on:
- 'docs/**'
- '**/README.md'
+env:
+ APT_SET_CONF: |
+ echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
+ echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
+ echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
+ CCACHE_SETTINGS: |
+ ccache --max-size=150M
+ ccache --set-config=compression=true
+
jobs:
build-macos:
runs-on: ubuntu-18.04
env:
- CCACHE_COMPRESS: 1
CCACHE_TEMPDIR: /tmp/.ccache-temp
strategy:
fail-fast: false
@@ -50,20 +58,31 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: recursive
+# Most volatile cache
- name: ccache
uses: actions/cache@v2
with:
- path: |
- ~/.ccache
- contrib/depends/built
- contrib/depends/sdk-sources
+ path: ~/.ccache
key: ccache-${{ matrix.toolchain.host }}-${{ github.sha }}
restore-keys: ccache-${{ matrix.toolchain.host }}-
+# Less volatile cache
+ - name: depends cache
+ uses: actions/cache@v2
+ with:
+ path: contrib/depends/built
+ key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
+ restore-keys: |
+ depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
+ depends-${{ matrix.toolchain.host }}-
+# Static cache
+ - name: OSX SDK cache
+ uses: actions/cache@v2
+ with:
+ path: contrib/depends/sdk-sources
+ key: sdk-${{ matrix.toolchain.host }}-${{ matrix.toolchain.osx_sdk }}
+ restore-keys: sdk-${{ matrix.toolchain.host }}-${{ matrix.toolchain.osx_sdk }}
- name: set apt conf
- run: |
- echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
- echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
- echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
+ run: ${{env.APT_SET_CONF}}
- name: install dependencies
run: sudo apt update; sudo apt -y install build-essential libtool cmake autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache ${{ matrix.toolchain.packages }}
- name: prepare apple-darwin11
@@ -79,7 +98,7 @@ jobs:
sudo update-alternatives --set ${{ matrix.toolchain.host }}-gcc $(which ${{ matrix.toolchain.host }}-gcc-posix)
- name: build
run: |
- ccache --max-size=150M
+ ${{env.CCACHE_SETTINGS}}
make depends target=${{ matrix.toolchain.host }} -j2
- uses: actions/upload-artifact@v2
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'x86_64-apple-darwin11' || matrix.toolchain.host == 'x86_64-unknown-linux-gnu' }}