Skip to content

Commit

Permalink
Build in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Aug 1, 2024
1 parent d7ca1e9 commit 3486e05
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ 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@v2

Expand All @@ -22,7 +30,7 @@ jobs:
bundler-cache: true

- name: Build and push docker image
run: bin/rake docker:build_all
run: bin/rake docker:build[${{ matrix.version }},${{ matrix.line_editor }},${{ matrix.compiler }}]
env:
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}

Expand Down
13 changes: 12 additions & 1 deletion tasks/docker.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,21 @@ namespace :docker do
end

desc "Build the default docker image"
task :build do
task :build_default do
Docker::Manager.build_default
end

desc "Builds a docker image"
task :build, %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
end

desc "Build a ruby trunk image"
task :build_and_push_head, %i[line_editor compiler] do |_t, opts|
manager = Docker::Manager.new(
Expand Down

0 comments on commit 3486e05

Please sign in to comment.