Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try get CI back on track #850

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
dd9e386
Bundler 2.5.17
deivid-rodriguez Aug 1, 2024
4cbba64
bundle update minitest
deivid-rodriguez Aug 1, 2024
3356492
bundle update octokit
deivid-rodriguez Aug 1, 2024
5bb0c9d
Test with latest Rubies
deivid-rodriguez Aug 1, 2024
b403617
Fix missing psych in Dockerfile
deivid-rodriguez Aug 1, 2024
f9f4599
Use newer `YAML.safe_load` interface
deivid-rodriguez Aug 1, 2024
7d84710
Run on ubuntu-24.04
deivid-rodriguez Aug 1, 2024
bf6fb14
Let default Bundler & RubyGems be used
deivid-rodriguez Aug 1, 2024
46e602b
Allow CI to build and push
deivid-rodriguez Aug 1, 2024
817a6ea
Try build
deivid-rodriguez Aug 1, 2024
d7ca1e9
Remove DOCKER_USER
deivid-rodriguez Aug 1, 2024
3486e05
Build in parallel
deivid-rodriguez Aug 1, 2024
6bf4cf4
Also push
deivid-rodriguez Aug 1, 2024
3dfaf68
Do it in one step
deivid-rodriguez Aug 1, 2024
eb65f60
Move building to separate workflow
deivid-rodriguez Aug 1, 2024
6ce8cac
Upgrade actions/checkout
deivid-rodriguez Aug 28, 2024
d2ca110
Bundler 2.5.18
deivid-rodriguez Aug 27, 2024
0a9f6b9
Downgrade actions/checkout
deivid-rodriguez Sep 4, 2024
deaac67
Alpine 3.11 and openssl
deivid-rodriguez Sep 4, 2024
0f61657
Remove Bundler setting that no longer exists
deivid-rodriguez Sep 10, 2024
6462fa3
bundle update rake
deivid-rodriguez Sep 10, 2024
caedc7f
Bump minitest to 5.15
deivid-rodriguez Sep 10, 2024
6ebbdd2
bundle update faraday
deivid-rodriguez Sep 10, 2024
936f5dc
Yard 0.9.37
deivid-rodriguez Sep 10, 2024
3f17b7b
Pry 0.14.2
deivid-rodriguez Sep 10, 2024
eaedce0
Use unreleased pry to get rid of ostruct warning
deivid-rodriguez Sep 10, 2024
bbffd35
Update to latest minitest
deivid-rodriguez Sep 10, 2024
3b6b7d6
Temporarily add json to fix more warnings
deivid-rodriguez Sep 10, 2024
e24ccf0
Bump artifact actions
deivid-rodriguez Sep 10, 2024
03fa4a5
Add `faraday-retry` to fix more warnings
deivid-rodriguez Sep 10, 2024
8f5270e
More warning fixes
deivid-rodriguez Sep 10, 2024
a932093
Bunder 2.5.18 in lint Gemfile
deivid-rodriguez Sep 10, 2024
99aec82
Restore RubyGems upgrade
deivid-rodriguez Sep 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bundle/config
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
---
BUNDLE_PATH: ".bundle"
BUNDLE_SPECIFIC_PLATFORM: "true"
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

name: build

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-24.04

strategy:
fail-fast: false

matrix:
version: [3.1.6, 3.2.5, 3.3.3]
line_editor: [libedit, readline]
compiler: [clang, gcc]

steps:
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.3
bundler-cache: true

- name: Build and push docker image
run: bin/rake docker:build_and_push[${{ matrix.version }},${{ matrix.line_editor }},${{ matrix.compiler }}]
env:
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
3 changes: 1 addition & 2 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
compiler: [clang, gcc]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install Docker client
run: |
Expand All @@ -34,7 +34,6 @@ jobs:
- name: Build and push docker image
run: bin/rake docker:build_and_push_head[${{ matrix.line_editor }},${{ matrix.compiler }}]
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
continue-on-error: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install OS dependencies
run: dnf install -y ruby ruby-devel make gcc redhat-rpm-config
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ jobs:
test:
container: deividrodriguez/byebug:${{ matrix.version }}-${{ matrix.line_editor }}-${{ matrix.compiler }}

runs-on: ubuntu-18.04
runs-on: ubuntu-24.04

strategy:
fail-fast: false

matrix:
version: [2.5.9, 2.6.10, 2.7.8, 3.0.6, 3.1.4, 3.2.2]
version: [3.1.6, 3.2.5, 3.3.3]
line_editor: [libedit, readline]
compiler: [clang, gcc]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v1

- name: Run CI checks
run: |
Expand All @@ -33,44 +33,44 @@ jobs:

- name: Save coverage
run: mv coverage/.resultset.json coverage/${{ matrix.version }}-${{ matrix.line_editor }}-${{ matrix.compiler }}.json
if: startsWith(matrix.version, '2.5')
if: startsWith(matrix.version, '3.3')

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.version }}-${{ matrix.line_editor }}-${{ matrix.compiler }}
path: coverage/${{ matrix.version }}-${{ matrix.line_editor }}-${{ matrix.compiler }}.json
if: startsWith(matrix.version, '2.5')
if: startsWith(matrix.version, '3.3')

timeout-minutes: 15

coverage:
container: deividrodriguez/byebug:2.7.2-readline-gcc
container: deividrodriguez/byebug:3.3.3-readline-gcc

runs-on: ubuntu-18.04
runs-on: ubuntu-24.04

needs: test

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/download-artifact@v1
- uses: actions/download-artifact@v4
with:
name: coverage-2.5.8-libedit-clang
name: coverage-3.3.3-libedit-clang
path: coverage

- uses: actions/download-artifact@v1
- uses: actions/download-artifact@v4
with:
name: coverage-2.5.8-libedit-gcc
name: coverage-3.3.3-libedit-gcc
path: coverage

- uses: actions/download-artifact@v1
- uses: actions/download-artifact@v4
with:
name: coverage-2.5.8-readline-clang
name: coverage-3.3.3-readline-clang
path: coverage

- uses: actions/download-artifact@v1
- uses: actions/download-artifact@v4
with:
name: coverage-2.5.8-readline-gcc
name: coverage-3.3.3-readline-gcc
path: coverage

- name: Aggregate coverage results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
version: [2.5.8, 2.6.6, 2.7.2, head]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/cache@v1
with:
Expand Down
10 changes: 7 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ gemspec

group :development do
gem "chandler", "0.9.0"
gem "minitest", "~> 5.11"
gem "pry", "0.14.1"
gem "minitest", "~> 5.25"
gem "pry", github: "pry/pry"
gem "rake", "~> 13.0"
gem "rake-compiler", "~> 1.0"
gem "simplecov", "0.21.2"
gem "yard", "0.9.26"
gem "yard", "0.9.37"
end

gem "json", "2.7.2"
gem "faraday-retry"
gem "octokit", github: "https://github.com/octokit/octokit.rb/pull/1712"
67 changes: 45 additions & 22 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
GIT
remote: https://github.com/octokit/octokit.rb.git
revision: 32b73b67f6676b24f5bd0eb58b332c4312934603
ref: refs/pull/1712/head
specs:
octokit (9.1.0)
faraday (>= 1, < 3)
sawyer (~> 0.9)

GIT
remote: https://github.com/pry/pry.git
revision: 17581b353f407e61cd5d6a7475a8cba493f71d1e
specs:
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)

PATH
remote: .
specs:
Expand All @@ -6,39 +23,42 @@ PATH
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
chandler (0.9.0)
netrc
octokit (>= 2.2.0)
coderay (1.1.3)
docile (1.3.4)
faraday (1.0.0)
multipart-post (>= 1.2, < 3)
method_source (1.0.0)
minitest (5.14.4)
multipart-post (2.1.1)
faraday (2.11.0)
faraday-net_http (>= 2.0, < 3.4)
logger
faraday-net_http (3.3.0)
net-http
faraday-retry (2.2.1)
faraday (~> 2.0)
json (2.7.2)
logger (1.6.1)
method_source (1.1.0)
minitest (5.25.1)
net-http (0.4.1)
uri
netrc (0.11.0)
octokit (4.15.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.3)
rake (13.0.3)
public_suffix (6.0.1)
rake (13.2.1)
rake-compiler (1.1.1)
rake
sawyer (0.8.2)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
faraday (>= 0.17.3, < 3)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.2)
yard (0.9.26)
uri (0.13.1)
yard (0.9.37)

PLATFORMS
ruby
Expand All @@ -48,12 +68,15 @@ DEPENDENCIES
bundler (~> 2.0)
byebug!
chandler (= 0.9.0)
minitest (~> 5.11)
pry (= 0.14.1)
faraday-retry
json (= 2.7.2)
minitest (~> 5.25)
octokit!
pry!
rake (~> 13.0)
rake-compiler (~> 1.0)
simplecov (= 0.21.2)
yard (= 0.9.26)
yard (= 0.9.37)

BUNDLED WITH
2.3.26
2.5.18
4 changes: 1 addition & 3 deletions bin/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ set -eo pipefail

set +x

gem update --system 3.4.20
gem install bundler --version 2.3.26 --force

gem update --system 3.5.18
bundle install

set -x
5 changes: 4 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.10
FROM alpine:3.11

# skip installing gem documentation
RUN mkdir -p /usr/local/etc \
Expand Down Expand Up @@ -42,7 +42,10 @@ RUN set -ex \
$line_edit_lib \
linux-headers \
ncurses-dev \
openssl \
openssl-dev \
ruby \
yaml-dev \
" \
&& apk add --no-cache --virtual .ruby-builddeps $baseDeps $buildOnlyDeps \
\
Expand Down
13 changes: 5 additions & 8 deletions docker/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ module Docker
#
class Manager
VERSIONS = %w[
2.5.9
2.6.10
2.7.8
3.0.6
3.1.4
3.2.2
3.1.6
3.2.5
3.3.3
].freeze

LINE_EDITORS = %w[
Expand Down Expand Up @@ -106,7 +103,7 @@ def push_all
def release_info
@release_info ||= YAML.safe_load(
Net::HTTP.get(URI.parse(releases_url)),
[Date]
permitted_classes: [Date]
)
end

Expand All @@ -128,7 +125,7 @@ def login
docker
login
-u
#{ENV['DOCKER_USER']}
deividrodriguez
-p
#{ENV['DOCKER_PASS']}
]
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/lint/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ DEPENDENCIES
yard (= 0.9.26)

BUNDLED WITH
2.3.26
2.5.18
13 changes: 13 additions & 0 deletions tasks/docker.rake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ namespace :docker do
manager.push
end

desc "Build and push an image"
task :build_and_push, %i[version line_editor compiler] do |_t, opts|
manager = Docker::Manager.new(
version: opts[:version],
line_editor: opts[:line_editor],
compiler: opts[:compiler]
)

manager.build
manager.login
manager.push
end

desc "Test all docker images"
task :test_all do
Docker::Manager.test_all
Expand Down
1 change: 1 addition & 0 deletions test/minitest_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module Byebug
#
class MinitestRunner
def initialize
Minitest.seed = ENV["SEED"] || srand
@test_suites = extract_from_argv { |cmd_arg| test_suite?(cmd_arg) }
end

Expand Down
Loading