|
| 1 | +name: Build and Test on macOS |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + paths: |
| 7 | + - 'src/**' |
| 8 | + - '!src/Plugins/Windows/**' |
| 9 | + - 'TeXmacs/plugins/goldfish/src/*' |
| 10 | + - 'tests/**' |
| 11 | + - 'xmake.lua' |
| 12 | + - 'xmake/packages.lua' |
| 13 | + - 'xmake/research.lua' |
| 14 | + - 'xmake/packages/**' |
| 15 | + - 'xmake-requires.lock' |
| 16 | + - '.github/workflows/ci-xmake-macos.yml' |
| 17 | + pull_request: |
| 18 | + branches: [ main ] |
| 19 | + paths: |
| 20 | + - 'src/**' |
| 21 | + - '!src/Plugins/Windows/**' |
| 22 | + - 'TeXmacs/plugins/goldfish/src/*' |
| 23 | + - 'tests/**' |
| 24 | + - 'xmake.lua' |
| 25 | + - 'xmake/packages.lua' |
| 26 | + - 'xmake/research.lua' |
| 27 | + - 'xmake/packages/**' |
| 28 | + - 'xmake-requires.lock' |
| 29 | + - '.github/workflows/ci-xmake-macos.yml' |
| 30 | + |
| 31 | +jobs: |
| 32 | + macosbuild: |
| 33 | + strategy: |
| 34 | + matrix: |
| 35 | + os: [macos-13] |
| 36 | + arch: [x86_64] |
| 37 | + runs-on: macos-13 |
| 38 | + timeout-minutes: 45 |
| 39 | + if: always() |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v4 |
| 42 | + with: |
| 43 | + fetch-depth: 1 |
| 44 | + - name: cache xmake |
| 45 | + uses: actions/cache@v4 |
| 46 | + with: |
| 47 | + path: | |
| 48 | + ${{github.workspace}}/build/.build_cache |
| 49 | + /Users/runner/.xmake |
| 50 | + key: xmake-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('xmake-requires.lock') }} |
| 51 | + - name: Install Qt |
| 52 | + uses: jurplel/install-qt-action@v3 |
| 53 | + with: |
| 54 | + version: 6.5.3 |
| 55 | + target: 'desktop' |
| 56 | + cache: 'true' |
| 57 | + |
| 58 | + - name: set XMAKE_GLOBALDIR |
| 59 | + run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV |
| 60 | + |
| 61 | + - uses: xmake-io/github-action-setup-xmake@v1 |
| 62 | + with: |
| 63 | + xmake-version: v2.8.7 |
| 64 | + actions-cache-folder: '.xmake-cache' |
| 65 | + |
| 66 | + - name: xmake repo --update |
| 67 | + run: xmake repo --update |
| 68 | + |
| 69 | + - name: cache packages from xrepo |
| 70 | + uses: actions/cache@v3 |
| 71 | + with: |
| 72 | + path: | |
| 73 | + ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages |
| 74 | + key: xrepo-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('xmake-requires.lock') }} |
| 75 | + |
| 76 | + - name: cache xmake |
| 77 | + uses: actions/cache@v3 |
| 78 | + with: |
| 79 | + path: | |
| 80 | + ${{ runner.workspace }}/build/.build_cache |
| 81 | + key: xmake-build-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('xmake-requires.lock') }} |
| 82 | + |
| 83 | + - name: config |
| 84 | + run: xmake config --policies=build.ccache -o ${{ runner.workspace }}/build -m releasedbg --yes |
| 85 | + - name: build |
| 86 | + run: xmake build --yes -vD research && xmake build --yes -vD --group=tests |
| 87 | + - name: C++ tests |
| 88 | + run: xmake run --yes --verbose --diagnosis --group=tests |
| 89 | + env: |
| 90 | + QT_QPA_PLATFORM: offscreen |
| 91 | + - name: Scheme tests |
| 92 | + run: xmake run --yes -vD --group=scheme_tests |
| 93 | + - name: integration test |
| 94 | + run: xmake run --yes -vD --group=integration_tests |
| 95 | + env: |
| 96 | + QT_QPA_PLATFORM: offscreen |
0 commit comments