|
8 | 8 | - cron: "0 5 * * 3" # At 05:00 on Wednesday # https://crontab.guru/#0_5_*_*_3 |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - job_build_x64: |
| 11 | + rcd_build: |
12 | 12 | name: Build |
13 | 13 | runs-on: ubuntu-latest |
14 | 14 | strategy: |
|
18 | 18 | - platform: "x64-mingw-ucrt" |
19 | 19 | - platform: "x64-mingw32" |
20 | 20 | - platform: "x86-mingw32" |
21 | | - - platform: "x86_64-linux-gnu" |
| 21 | + - platform: "x86_64-linux" |
22 | 22 | steps: |
23 | 23 | - uses: actions/checkout@v4 |
24 | 24 | - name: Set up Ruby |
|
45 | 45 |
|
46 | 46 | job_test_binary: |
47 | 47 | name: Test |
48 | | - needs: job_build_x64 |
| 48 | + needs: rcd_build |
49 | 49 | strategy: |
50 | 50 | fail-fast: false |
51 | 51 | matrix: |
|
63 | 63 | PGVERSION: 16.6-1-windows-x64 |
64 | 64 | - os: ubuntu-latest |
65 | 65 | ruby: "3.2" |
66 | | - platform: "x86_64-linux-gnu" |
| 66 | + platform: "x86_64-linux" |
67 | 67 |
|
68 | 68 | runs-on: ${{ matrix.os }} |
69 | 69 | env: |
@@ -132,3 +132,33 @@ jobs: |
132 | 132 | ridk enable |
133 | 133 | find "$(ruby -e"puts RbConfig::CONFIG[%q[libdir]]")" -name mkmf.log -print0 | xargs -0 cat |
134 | 134 | find -name setup.log -print0 | xargs -0 cat |
| 135 | +
|
| 136 | +
|
| 137 | + job_binary_multiarch: |
| 138 | + name: multiarch (${{matrix.platform}} on ${{matrix.from_image}} ${{matrix.image_platform}}) |
| 139 | + needs: rcd_build |
| 140 | + strategy: |
| 141 | + fail-fast: false |
| 142 | + matrix: |
| 143 | + include: |
| 144 | + - from_image: fedora:39 |
| 145 | + image_platform: linux/x86_64 |
| 146 | + gem_platform: x86_64-linux |
| 147 | + dockerfile: centos |
| 148 | + - from_image: alpine |
| 149 | + image_platform: linux/x86_64 |
| 150 | + gem_platform: x86_64-linux |
| 151 | + dockerfile: alpine |
| 152 | + |
| 153 | + runs-on: ubuntu-latest |
| 154 | + steps: |
| 155 | + - uses: actions/checkout@v4 |
| 156 | + - name: Download gem-${{ matrix.gem_platform }} |
| 157 | + uses: actions/download-artifact@v4 |
| 158 | + with: |
| 159 | + name: binary-gem-${{ matrix.gem_platform }} |
| 160 | + - name: Build image and Run tests |
| 161 | + run: | |
| 162 | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes |
| 163 | + docker build --rm --platform ${{matrix.image_platform}} --build-arg from_image=${{matrix.from_image}} -t ruby-test -f spec/env/Dockerfile.${{matrix.dockerfile}} . |
| 164 | + docker run --rm -t --network=host -v `pwd`:/build ruby-test |
0 commit comments