|
61 | 61 | name: ${{ github.sha }} |
62 | 62 | path: pyroscope_ffi/ruby/pkg/*.gem |
63 | 63 |
|
| 64 | + macos: |
| 65 | + strategy: |
| 66 | + fail-fast: false |
| 67 | + matrix: |
| 68 | + include: |
| 69 | + - macos-version: "10.15" |
| 70 | + target: x86_64-apple-darwin |
| 71 | + py-platform: macosx-10_15_x86_64 |
| 72 | + - macos-version: "11.0" |
| 73 | + target: aarch64-apple-darwin |
| 74 | + py-platform: macosx-11_0_arm64 |
| 75 | + |
| 76 | + name: macOS - ${{ matrix.platform }} |
| 77 | + runs-on: macos-${{ matrix.macos-version }} |
| 78 | + |
| 79 | + steps: |
| 80 | + - uses: actions/checkout@v2 |
| 81 | + |
| 82 | + - uses: actions-rs/toolchain@v1 |
| 83 | + with: |
| 84 | + toolchain: stable |
| 85 | + target: ${{ matrix.target }} |
| 86 | + profile: minimal |
| 87 | + override: true |
| 88 | + |
| 89 | + - uses: ruby/setup-ruby@v1 |
| 90 | + with: |
| 91 | + ruby-version: '3.1' |
| 92 | + |
| 93 | + - name: Install bundles |
| 94 | + run: bundle |
| 95 | + working-directory: pyroscope_ffi/ruby |
| 96 | + |
| 97 | + - name: Build native extensions |
| 98 | + run: rake rbspy_install |
| 99 | + working-directory: pyroscope_ffi/ruby |
| 100 | + |
| 101 | + - name: Build native extensions |
| 102 | + run: rake thread_id_install |
| 103 | + working-directory: pyroscope_ffi/ruby |
| 104 | + |
| 105 | + - if: matrix.build-arch == 'x86_64-apple-darwin' |
| 106 | + name: Build macos gem |
| 107 | + run: rake x86_64_darwin:gem |
| 108 | + working-directory: pyroscope_ffi/ruby |
| 109 | + |
| 110 | + - if: matrix.build-arch == 'aarch64-apple-darwin' |
| 111 | + name: Build macos gem |
| 112 | + run: rake arm64_linux:gem |
| 113 | + working-directory: pyroscope_ffi/ruby |
| 114 | + |
| 115 | + - uses: actions/upload-artifact@v2 |
| 116 | + with: |
| 117 | + name: ${{ github.sha }} |
| 118 | + path: pyroscope_ffi/ruby/pkg/*.gem |
| 119 | + |
64 | 120 | source: |
65 | 121 | name: source |
66 | 122 | runs-on: ubuntu-latest |
|
0 commit comments