|
40 | 40 | has_RUnit: 'false'
|
41 | 41 | cache-version: 'cache-v1'
|
42 | 42 | run_docker: 'false'
|
| 43 | + latest_release: 'true' |
43 | 44 |
|
44 | 45 | jobs:
|
45 |
| - build-check: |
46 |
| - runs-on: ${{ matrix.config.os }} |
47 |
| - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) |
48 |
| - container: ${{ matrix.config.cont }} |
49 |
| - ## Environment variables unique to this job. |
| 46 | + bioc-config: |
| 47 | + runs-on: ubuntu-latest |
| 48 | + outputs: |
| 49 | + matrix: ${{ steps.set-matrix.outputs.matrix }} |
| 50 | + steps: |
| 51 | + - id: set-bioc-matrix |
| 52 | + run: | |
| 53 | + bioc=$(curl -L https://bioconductor.org/config.yaml) |
| 54 | + if [[ "$latest_release" == "true" ]]; then |
| 55 | + echo "Finding the latest BioC release version and the corresponding R version" |
| 56 | + biocversion=$(echo $bioc | grep "release_version: " | grep -Eo "[0-9]{1}\.[0-9]{2}") |
| 57 | + rversion=$(echo $bioc | grep "r_version_associated_with_release: " | grep -Eo "[0-9]{1}\.[0-9]{1}") |
| 58 | + biocmajor=$(echo $biocversion | cut -c 1-1) |
| 59 | + biocminor=$(echo $biocversion | cut -c 3-4) |
| 60 | + bioccont="bioconductor/bioconductor_docker:RELEASE_${biocmajor}_${biocminor}" |
| 61 | + else |
| 62 | + echo "Finding the latest BioC devel version and the corresponding R version" |
| 63 | + biocversion=$(echo $bioc | grep "devel_version: " | grep -Eo "[0-9]{1}\.[0-9]{2}") |
| 64 | + rversion=$(echo $bioc | grep "r_version_associated_with_devel: " | grep -Eo "[0-9]{1}\.[0-9]{1}") |
| 65 | + bioccont="bioconductor/bioconductor_docker:devel" |
| 66 | + fi |
| 67 | + echo "matrix={ \"config\": { [{\"os\" : \"ubuntu-latest\", \"r\" : \"${rversion}\", \"bioc\" : \"${biocversion}\", \"cont\" : \"${bioccont}\"} , {\"os\" : \"macOS-latest\", \"r\" : \"${rversion}\", \"bioc\" : \"${biocversion}\"} , {\"os\" : \"windows-latest\", \"r\" : \"${rversion}\", \"bioc\" : \"${biocversion}\" }] } }" |
50 | 68 |
|
| 69 | + build-check: |
| 70 | + needs: bioc-config |
51 | 71 | strategy:
|
52 | 72 | fail-fast: false
|
53 |
| - matrix: |
54 |
| - config: |
55 |
| - - { os: ubuntu-latest, r: '4.4', bioc: '3.20', cont: "bioconductor/bioconductor_docker:RELEASE_3_20"} |
56 |
| - - { os: macOS-latest, r: '4.4', bioc: '3.20'} |
57 |
| - - { os: windows-latest, r: '4.4', bioc: '3.20'} |
| 73 | + matrix: ${{fromJson(needs.bioc-config.outputs.matrix)}} |
58 | 74 | ## Check https://github.com/r-lib/actions/tree/master/examples
|
59 | 75 | ## for examples using the http-user-agent
|
| 76 | + runs-on: ${{ matrix.config.os }} |
| 77 | + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) |
| 78 | + container: ${{ matrix.config.cont }} |
| 79 | + ## Environment variables unique to this job. |
60 | 80 | env:
|
61 | 81 | R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
62 | 82 | NOT_CRAN: true
|
|
0 commit comments