|
84 | 84 | steps: |
85 | 85 | - uses: ruby/setup-ruby@v1 |
86 | 86 | with: |
87 | | - ruby-version: '3.0' |
| 87 | + ruby-version: ${{ matrix.RUBY_VERSION }} |
88 | 88 | - uses: actions/download-artifact@master |
89 | 89 | with: |
90 | 90 | name: "linux.gem" |
@@ -156,72 +156,105 @@ jobs: |
156 | 156 | #name: ${{ github.sha }} |
157 | 157 | #path: pyroscope_ffi/ruby/pkg/*.gem |
158 | 158 |
|
159 | | - #macos: |
160 | | - #strategy: |
161 | | - #fail-fast: false |
162 | | - #matrix: |
163 | | - #include: |
164 | | - #- macos-version: "11.0" |
165 | | - #target: x86_64-apple-darwin |
166 | | - #py-platform: macosx-11_0_x86_64 |
167 | | - #- macos-version: "11.0" |
168 | | - #target: aarch64-apple-darwin |
169 | | - #py-platform: macosx-11_0_arm64 |
| 159 | + macos: |
| 160 | + strategy: |
| 161 | + fail-fast: false |
| 162 | + matrix: |
| 163 | + include: |
| 164 | + - macos-version: "11.0" |
| 165 | + target: x86_64-apple-darwin |
| 166 | + py-platform: macosx-11_0_x86_64 |
| 167 | + - macos-version: "11.0" |
| 168 | + target: aarch64-apple-darwin |
| 169 | + py-platform: macosx-11_0_arm64 |
170 | 170 |
|
171 | | - #name: macOS - ${{ matrix.platform }} |
172 | | - #runs-on: macos-${{ matrix.macos-version }} |
| 171 | + name: macOS - ${{ matrix.platform }} |
| 172 | + runs-on: macos-${{ matrix.macos-version }} |
173 | 173 |
|
174 | | - #env: |
175 | | - #RUST_TARGET: ${{ matrix.target }} |
| 174 | + env: |
| 175 | + RUST_TARGET: ${{ matrix.target }} |
176 | 176 |
|
177 | | - #steps: |
178 | | - #- uses: actions/checkout@v2 |
| 177 | + steps: |
| 178 | + - uses: actions/checkout@v2 |
179 | 179 |
|
180 | | - #- uses: actions-rs/toolchain@v1 |
181 | | - #with: |
182 | | - #toolchain: stable |
183 | | - #target: ${{ matrix.target }} |
184 | | - #profile: minimal |
185 | | - #override: true |
| 180 | + - uses: actions-rs/toolchain@v1 |
| 181 | + with: |
| 182 | + toolchain: stable |
| 183 | + target: ${{ matrix.target }} |
| 184 | + profile: minimal |
| 185 | + override: true |
186 | 186 |
|
187 | | - #- uses: ruby/setup-ruby@v1 |
188 | | - #with: |
189 | | - #ruby-version: '3.1' |
| 187 | + - uses: ruby/setup-ruby@v1 |
| 188 | + with: |
| 189 | + ruby-version: '3.1' |
190 | 190 |
|
191 | | - #- name: Install bundles |
192 | | - #run: bundle |
193 | | - #working-directory: pyroscope_ffi/ruby |
| 191 | + - name: Install bundles |
| 192 | + run: bundle |
| 193 | + working-directory: pyroscope_ffi/ruby |
194 | 194 |
|
195 | | - #- name: Update lock files |
196 | | - #run: cargo update |
197 | | - #working-directory: pyroscope_ffi/ruby/ext/rbspy |
| 195 | + - name: Update lock files |
| 196 | + run: cargo update |
| 197 | + working-directory: pyroscope_ffi/ruby/ext/rbspy |
198 | 198 |
|
199 | | - #- name: Update lock files |
200 | | - #run: cargo update |
201 | | - #working-directory: pyroscope_ffi/ruby/ext/thread_id |
| 199 | + - name: Update lock files |
| 200 | + run: cargo update |
| 201 | + working-directory: pyroscope_ffi/ruby/ext/thread_id |
202 | 202 |
|
203 | | - #- name: Build native extensions |
204 | | - #run: rake rbspy_install |
205 | | - #working-directory: pyroscope_ffi/ruby |
| 203 | + - name: Build native extensions |
| 204 | + run: rake rbspy_install |
| 205 | + working-directory: pyroscope_ffi/ruby |
206 | 206 |
|
207 | | - #- name: Build native extensions |
208 | | - #run: rake thread_id_install |
209 | | - #working-directory: pyroscope_ffi/ruby |
| 207 | + - name: Build native extensions |
| 208 | + run: rake thread_id_install |
| 209 | + working-directory: pyroscope_ffi/ruby |
210 | 210 |
|
211 | | - #- if: matrix.target == 'x86_64-apple-darwin' |
212 | | - #name: Build macos gem |
213 | | - #run: rake x86_64_darwin:gem |
214 | | - #working-directory: pyroscope_ffi/ruby |
| 211 | + - if: matrix.target == 'x86_64-apple-darwin' |
| 212 | + name: Build macos gem |
| 213 | + run: rake x86_64_darwin:gem |
| 214 | + working-directory: pyroscope_ffi/ruby |
215 | 215 |
|
216 | | - #- if: matrix.target == 'aarch64-apple-darwin' |
217 | | - #name: Build macos gem |
218 | | - #run: rake arm64_darwin:gem |
219 | | - #working-directory: pyroscope_ffi/ruby |
| 216 | + - if: matrix.target == 'aarch64-apple-darwin' |
| 217 | + name: Build macos gem |
| 218 | + run: rake arm64_darwin:gem |
| 219 | + working-directory: pyroscope_ffi/ruby |
220 | 220 |
|
221 | | - #- uses: actions/upload-artifact@v2 |
222 | | - #with: |
223 | | - #name: ${{ github.sha }} |
224 | | - #path: pyroscope_ffi/ruby/pkg/*.gem |
| 221 | + - uses: actions/upload-artifact@v2 |
| 222 | + with: |
| 223 | + name: ${{ matrix.target }} |
| 224 | + path: pyroscope_ffi/ruby/pkg/*.gem |
| 225 | + |
| 226 | + macos-intel-test: |
| 227 | + strategy: |
| 228 | + fail-fast: false |
| 229 | + matrix: |
| 230 | + PYROSCOPE_DETECT_SUBPROCESSES: [1, 0] |
| 231 | + PYROSCOPE_ONCPU: [1, 0] |
| 232 | + RUBY_VERSION: ['2.6', '2.7', '3.0', '3.1'] |
| 233 | + needs: ['macos-build'] |
| 234 | + name: macOS Test |
| 235 | + runs-on: macos-12.0 |
| 236 | + steps: |
| 237 | + - uses: ruby/setup-ruby@v1 |
| 238 | + with: |
| 239 | + ruby-version: ${{ matrix.RUBY_VERSION }} |
| 240 | + - uses: actions/download-artifact@master |
| 241 | + with: |
| 242 | + name: "linux.gem" |
| 243 | + path: "${{github.workspace}}/ruby" |
| 244 | + - run: "cd ${{ github.workspace }}/ruby && ls -l" |
| 245 | + - run: "cd ${{ github.workspace }}/ruby && gem install *.gem" |
| 246 | + - uses: actions/checkout@v2 |
| 247 | + with: |
| 248 | + submodules: recursive |
| 249 | + - name: Run Ruby Script |
| 250 | + run: pyroscope_ffi/ruby/scripts/tests/test.rb |
| 251 | + env: |
| 252 | + PYROSCOPE_RUN_ID: ${{ github.run_id }} |
| 253 | + PYROSCOPE_ARCH: x86-64-apple-darwin |
| 254 | + PYROSCOPE_API_TOKEN: ${{ secrets.PYROSCOPE_API_TOKEN }} |
| 255 | + PYROSCOPE_DETECT_SUBPROCESSES: ${{ matrix.PYROSCOPE_DETECT_SUBPROCESSES }} |
| 256 | + PYROSCOPE_ONCPU: ${{ matrix.PYROSCOPE_ONCPU }} |
| 257 | + RUBY_VERSION: ${{ matrix.RUBY_VERSION }} |
225 | 258 |
|
226 | 259 | #source: |
227 | 260 | #name: source |
|
0 commit comments