Skip to content

Commit 01c10dd

Browse files
committed
Use specific OS versions and not -latest so the meaning does not change
* We want to build on the oldest version, but the filename should still be macos-latest/windows-latest for compatibility.
1 parent 4a3d69c commit 01c10dd

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
strategy:
4949
fail-fast: false
5050
matrix:
51-
os: [ ubuntu-18.04, ubuntu-20.04, macos-latest ]
51+
os: [ ubuntu-18.04, ubuntu-20.04, macos-10.15 ]
5252
name: [ head, debug ]
5353
runs-on: ${{ matrix.os }}
5454
steps:
@@ -60,16 +60,22 @@ jobs:
6060
run: |
6161
upload_url=$(cat info/upload_url)
6262
echo "::set-output name=upload_url::$upload_url"
63+
- name: Set platform
64+
id: platform
65+
run: |
66+
platform=${{ matrix.os }}
67+
platform=${platform/macos-*/macos-latest}
68+
echo "::set-output name=platform::$platform"
6369
6470
- name: apt-get update on Ubuntu
6571
run: sudo apt-get update
6672
if: startsWith(matrix.os, 'ubuntu')
6773
- run: sudo apt-get install -y --no-install-recommends ruby bison libyaml-dev libgdbm-dev libreadline-dev libncurses5-dev
6874
if: startsWith(matrix.os, 'ubuntu')
6975
- run: brew install autoconf automake
70-
if: matrix.os == 'macos-latest'
76+
if: startsWith(matrix.os, 'macos')
7177
- name: Disable Firewall # Needed for TestSocket#test_udp_server in test-all
72-
if: matrix.os == 'macos-latest'
78+
if: startsWith(matrix.os, 'macos')
7379
run: |
7480
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
7581
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
@@ -97,12 +103,12 @@ jobs:
97103
- run: ./configure --prefix=$HOME/.rubies/ruby-${{ matrix.name }} --enable-shared --disable-install-doc
98104
if: startsWith(matrix.os, 'ubuntu')
99105
- run: ./configure --prefix=$HOME/.rubies/ruby-${{ matrix.name }} --enable-shared --disable-install-doc --with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline)
100-
if: matrix.os == 'macos-latest'
106+
if: startsWith(matrix.os, 'macos')
101107
- run: make -j4
102108
- run: make install
103109

104110
- name: Create archive
105-
run: tar czf ruby-${{ matrix.name }}-${{ matrix.os }}.tar.gz -C ~/.rubies ruby-${{ matrix.name }}
111+
run: tar czf ruby-${{ matrix.name }}-${{ steps.platform.outputs.platform }}.tar.gz -C ~/.rubies ruby-${{ matrix.name }}
106112

107113
# Test
108114
- run: make test-spec MSPECOPT=-j
@@ -131,8 +137,8 @@ jobs:
131137
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132138
with:
133139
upload_url: ${{ steps.upload_info.outputs.upload_url }}
134-
asset_path: ruby-${{ matrix.name }}-${{ matrix.os }}.tar.gz
135-
asset_name: ruby-${{ matrix.name }}-${{ matrix.os }}.tar.gz
140+
asset_path: ruby-${{ matrix.name }}-${{ steps.platform.outputs.platform }}.tar.gz
141+
asset_name: ruby-${{ matrix.name }}-${{ steps.platform.outputs.platform }}.tar.gz
136142
asset_content_type: application/gzip
137143

138144
metadata:

0 commit comments

Comments
 (0)