Repository navigation
107 lines (102 loc) · 4.21 KB
/
Copy pathci.yml
File metadata and controls
107 lines (102 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
permissions:
contents: read
name: "CI tests"
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
env:
MT_COMPAT: true
jobs:
tests:
if: ${{ github.repository == 'googleapis/gapic-generator-ruby' }}
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["3.2", "4.0"]
# Allow failures on 4.0; generator primarily runs on 3.2.
continue-on-error: ${{ matrix.ruby == '4.0' }}
steps:
- name: Install Ruby
uses: ruby/setup-ruby@78c62f2208e480ce3d5ae4dfd9b9e181acf48b63 # v1.344.0
with:
ruby-version: ${{ matrix.ruby }}
- name: Checkout repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Checkout submodules
run: |
git submodule set-url shared/googleapis https://github.com/googleapis/googleapis.git
git submodule set-url shared/gapic-showcase https://github.com/googleapis/gapic-showcase.git
git submodule update --init --recursive
- name: Install dependencies
run: |
gem install --no-document toys -v '~> 0.22.0'
toys bundle install
- name: Run CI
run: |
toys ci
# The showcase suite above runs on ubuntu-latest, whose system OpenSSL is
# 3.0.13. ML-KEM only exists from OpenSSL 3.5, so the REST test there
# expects the classical X25519 fallback. gRPC is unaffected because it
# carries its own BoringSSL inside the grpc gem.
#
# This job re-runs the same suite on a Debian trixie image (OpenSSL 3.5.5),
# where the REST test expects a post-quantum group instead. It is what
# actually proves REST post-quantum key exchange works. SHOWCASE_REQUIRE_REST_PQC
# makes the suite fail if the image's OpenSSL ever drops below 3.5, rather
# than silently falling back to the classical expectation.
#
# Once ubuntu-latest moves to Ubuntu 26.04 (OpenSSL 3.5.5) this job can be
# dropped and SHOWCASE_REQUIRE_REST_PQC set on the matrix above instead. That
# migration starts 2026-10-19 (actions/runner-images#14748). Tracked in
# b/564510736 - check the runner's actual OpenSSL before removing this,
# rather than going by the announced dates.
pqc-rest:
if: ${{ github.repository == 'googleapis/gapic-generator-ruby' }}
runs-on: ubuntu-latest
container: ruby:3.4-trixie@sha256:fb03bf4f099a4a6969e13d8be0a2783fa2c63ef44cb0aa7b9c66e0018d3794f8
env:
SHOWCASE_REQUIRE_REST_PQC: "1"
steps:
# Deliberately no ruby/setup-ruby: inside a container it detects
# debian-13-x64, treats the job as self-hosted, and will not use the
# prebuilt binaries. The image's own Ruby is already linked against the
# OpenSSL we want.
- name: Checkout repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Checkout submodules
run: |
# actions/checkout writes as the runner user (uid 1001) but this
# container runs as root, so git rejects the tree as dubiously
# owned. The host-runner `tests` job above does not hit this.
git config --global --add safe.directory '*'
git submodule set-url shared/googleapis https://github.com/googleapis/googleapis.git
git submodule set-url shared/gapic-showcase https://github.com/googleapis/gapic-showcase.git
git submodule update --init --recursive
- name: Verify the image provides a post-quantum capable OpenSSL
run: |
ruby -ropenssl -e '
required = Gem::Version.new "3.5.0"
actual = Gem::Version.new OpenSSL::OPENSSL_LIBRARY_VERSION.split[1]
if actual < required
abort "This job asserts post-quantum key exchange but the image " \
"provides OpenSSL #{actual}, below the required #{required}."
end
puts "OpenSSL #{actual} supports post-quantum key exchange."
'
- name: Install dependencies
run: |
gem install --no-document toys -v '~> 0.22.0'
toys bundle install
- name: Run showcase tests
run: |
cd shared
toys test showcase