File tree Expand file tree Collapse file tree 3 files changed +113
-3
lines changed
Expand file tree Collapse file tree 3 files changed +113
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Install OpenSSL
2+ inputs :
3+ version :
4+ description : ' The version of OpenSSL to install'
5+ required : true
6+ os :
7+ description : ' The operating system to install OpenSSL on'
8+ required : true
9+ runs :
10+ using : ' composite'
11+ steps :
12+ - name : Cache OpenSSL library
13+ id : cache-openssl
14+ uses : actions/cache@v4
15+ with :
16+ path : ~/openssl
17+ key : openssl-${{ inputs.version }}-${{ inputs.os }}
18+
19+ - name : Compile OpenSSL library
20+ if : steps.cache-openssl.outputs.cache-hit != 'true'
21+ shell : bash
22+ run : |
23+ mkdir -p tmp/build-openssl && cd tmp/build-openssl
24+ case ${{ inputs.version }} in
25+ 1.1.*)
26+ OPENSSL_COMMIT=OpenSSL_
27+ OPENSSL_COMMIT+=$(echo ${{ inputs.version }} | sed -e 's/\./_/g')
28+ git clone -b $OPENSSL_COMMIT --depth 1 https://github.com/openssl/openssl.git .
29+ echo "Git commit: $(git rev-parse HEAD)"
30+ ./Configure --prefix=$HOME/openssl --libdir=lib linux-x86_64
31+ make depend && make -j4 && make install_sw
32+ ;;
33+ *)
34+ echo "Don't know how to build OpenSSL ${{ inputs.version }}"
35+ ;;
36+ esac
Original file line number Diff line number Diff line change 1+ name : Install Ruby
2+ inputs :
3+ version :
4+ description : ' The version of Ruby to install'
5+ required : true
6+ os :
7+ description : ' The operating system to install Ruby on'
8+ required : true
9+ runs :
10+ using : ' composite'
11+ steps :
12+ - name : Cache Ruby
13+ id : ruby-cache
14+ uses : actions/cache@v4
15+ with :
16+ path : ~/rubies/ruby-${{ inputs.version }}
17+ key : ruby-${{ inputs.version }}-${{ inputs.os }}-openssl-1.1.1w
18+
19+ - name : Install Ruby
20+ if : steps.ruby-cache.outputs.cache-hit != 'true'
21+ shell : bash
22+ run : |
23+ latest_patch=$(curl -s https://cache.ruby-lang.org/pub/ruby/${{ inputs.version }}/ \
24+ | grep -oP "ruby-${{ inputs.version }}\.\d+\.tar\.xz" \
25+ | grep -oP "\d+(?=\.tar\.xz)" \
26+ | sort -V | tail -n 1)
27+ wget https://cache.ruby-lang.org/pub/ruby/${{ inputs.version }}/ruby-${{ inputs.version }}.${latest_patch}.tar.xz
28+ tar -xJvf ruby-${{ inputs.version }}.${latest_patch}.tar.xz
29+ cd ruby-${{ inputs.version }}.${latest_patch}
30+ ./configure --prefix=$HOME/rubies/ruby-${{ inputs.version }} --with-openssl-dir=$HOME/openssl
31+ make
32+ make install
33+ - name : Update PATH
34+ shell : bash
35+ run : |
36+ echo "~/rubies/ruby-${{ inputs.version }}/bin" >> $GITHUB_PATH
37+ - name : Install Bundler
38+ shell : bash
39+ run : |
40+ case ${{ inputs.version }} in
41+ 2.7* | 3.*)
42+ echo "Skipping Bundler installation for Ruby ${{ inputs.version }}"
43+ ;;
44+ 2.4* | 2.5* | 2.6*)
45+ gem install bundler -v '~> 2.3.0'
46+ ;;
47+ *)
48+ echo "Don't know how to install Bundler for Ruby ${{ inputs.version }}"
49+ ;;
50+ esac
51+ - name : Cache Bundler Install
52+ id : bundler-cache
53+ uses : actions/cache@v4
54+ env :
55+ GEMFILE : ${{ env.BUNDLE_GEMFILE || 'Gemfile' }}
56+ with :
57+ path : ./vendor/bundle
58+ key : bundler-ruby-${{ inputs.version }}-${{ inputs.os }}-${{ hashFiles(env.Gemfile, 'tpm-key_attestation.gemspec') }}
59+
60+ - name : Install dependencies
61+ shell : bash
62+ run : |
63+ bundle config set --local path ../vendor/bundle
64+ bundle install
Original file line number Diff line number Diff line change 7474 BUNDLE_GEMFILE : gemfiles/${{ matrix.gemfile }}.gemfile
7575 steps :
7676 - uses : actions/checkout@v2
77+
7778 - run : rm Gemfile.lock
78- - uses : ruby/setup-ruby@v1
79+
80+ - name : Install OpenSSL
81+ uses : ./.github/actions/install-openssl
7982 with :
80- ruby-version : ${{ matrix.ruby }}
81- bundler-cache : true
83+ version : " 1.1.1w"
84+ os : ${{ runner.os }}
85+
86+ - name : Manually set up Ruby
87+ uses : ./.github/actions/install-ruby
88+ with :
89+ version : ${{ matrix.ruby }}
90+ os : ${{ runner.os }}
91+
8292 - run : bundle exec rspec
You can’t perform that action at this time.
0 commit comments