|
| 1 | +name: Build macOS arm64 |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master ] |
| 6 | + pull_request: |
| 7 | + branches: [ master ] |
| 8 | + release: |
| 9 | + types: [ published ] |
| 10 | + workflow_dispatch: |
| 11 | + |
| 12 | +env: |
| 13 | + BUILD_TYPE: Release |
| 14 | + MACOSX_DEPLOYMENT_TARGET: 11.0 |
| 15 | + |
| 16 | +jobs: |
| 17 | + build: |
| 18 | + runs-on: macos-14 |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: Checkout |
| 22 | + |
| 23 | + |
| 24 | + - name: Install dependencies |
| 25 | + run: | |
| 26 | + brew reinstall zlib |
| 27 | + brew install openslide libomp |
| 28 | +
|
| 29 | + - name: Download FAST |
| 30 | + uses: robinraju/release-downloader@main |
| 31 | + with: |
| 32 | + repository: "AICAN-Research/FAST-Pathology-dependencies" |
| 33 | + latest: true |
| 34 | + fileName: "fast_macos10.13_arm64.tar.xz" |
| 35 | + out-file-path: "downloads" |
| 36 | + |
| 37 | + - name: Extract FAST |
| 38 | + run: | |
| 39 | + cd ${{github.workspace}}/downloads/ |
| 40 | + tar -xf fast_*.tar.xz -C ${{github.workspace}}/downloads/ |
| 41 | + mv ${{github.workspace}}/downloads/fast_*/fast ${{github.workspace}}/ |
| 42 | +
|
| 43 | + - name: Configure CMake |
| 44 | + run: | |
| 45 | + cmake -B ${{github.workspace}}/build -DFAST_DIR=${{github.workspace}}/fast/cmake/ -DCMAKE_OSX_ARCHITECTURES=arm64 |
| 46 | +
|
| 47 | + - name: Build FastPathology |
| 48 | + run: cmake --build ${{github.workspace}}/build --config Release --target fastpathology -j 4 |
| 49 | + |
| 50 | + - name: Build Package |
| 51 | + run: cmake --build ${{github.workspace}}/build --config Release --target package -j 4 |
| 52 | + |
| 53 | + - name: Upload Bundle package |
| 54 | + uses: actions/upload-artifact@v2 |
| 55 | + with: |
| 56 | + name: macOS package |
| 57 | + path: ${{github.workspace}}/build/fastpathology_*.dmg |
| 58 | + if-no-files-found: error |
| 59 | + |
| 60 | + - name: Upload archive package to release |
| 61 | + if: ${{ github.event_name == 'release' }} |
| 62 | + uses: svenstaro/upload-release-action@v2 |
| 63 | + with: |
| 64 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 65 | + file: ${{github.workspace}}/build/fastpathology_*.dmg |
| 66 | + file_glob: true |
| 67 | + tag: ${{ github.ref }} |
| 68 | + overwrite: true |
0 commit comments