github: Migrate from Travis CI to Github Actions
[strongswan.git] / .github / workflows / macos.yml
1 name: macOS
2
3 on: [push, pull_request]
4
5 env:
6   TESTS_REDUCED_KEYLENGTHS: yes
7   CCACHE_BASEDIR: ${{ github.workspace }}
8   CCACHE_COMPRESS: true
9   CCACHE_MAXSIZE: 100M
10   OS_NAME: macos
11
12 jobs:
13   macos:
14     runs-on: macos-latest
15     env:
16       TEST: macos
17     steps:
18       - uses: actions/checkout@v2
19       - uses: actions/cache@v2
20         with:
21           path: ~/Library/Caches/ccache
22           key: ccache-${{ runner.os }}-${{ github.ref }}:${{ github.sha }}
23           restore-keys: |
24             ccache-${{ runner.os }}-${{ github.ref }}:
25             ccache-${{ runner.os }}-
26       - run: |
27           brew install ccache
28           echo "PATH=$(brew --prefix)/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
29           ccache -z
30       - uses: ./.github/actions/default
31       - run: ccache -s
32       - if: ${{ failure() }}
33         uses: actions/upload-artifact@v2
34         with:
35           name: Logs ${{ github.job }}
36           path: config.log
37           retention-days: 5