c89678a558e9e69c302c7f17a0112b0f26132f96
[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   pre-check:
14     runs-on: ubuntu-latest
15     outputs:
16       should_skip: ${{ steps.skip-check.outputs.should_skip }}
17     steps:
18       - id: skip-check
19         uses: fkirc/skip-duplicate-actions@master
20         with:
21           concurrent_skipping: 'same_content'
22
23   macos:
24     needs: pre-check
25     if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
26     runs-on: macos-latest
27     env:
28       TEST: macos
29     steps:
30       - uses: actions/checkout@v2
31       - uses: actions/cache@v2
32         with:
33           path: ~/Library/Caches/ccache
34           key: ccache-${{ runner.os }}-${{ github.ref }}:${{ github.sha }}
35           restore-keys: |
36             ccache-${{ runner.os }}-${{ github.ref }}:
37             ccache-${{ runner.os }}-
38       - run: |
39           brew install ccache
40           echo "PATH=$(brew --prefix)/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
41           ccache -z
42       - uses: ./.github/actions/default
43       - run: ccache -s
44       - if: ${{ failure() }}
45         uses: actions/upload-artifact@v2
46         with:
47           name: Logs ${{ github.job }}
48           path: config.log
49           retention-days: 5