[前][次][番号順一覧][スレッド一覧]

ruby-changes:72373

From: Nobuyoshi <ko1@a...>
Date: Thu, 30 Jun 2022 18:00:15 +0900 (JST)
Subject: [ruby-changes:72373] 7dfaa617a4 (master): Use `matrix.arch` separated from `matrix.configure`

https://git.ruby-lang.org/ruby.git/commit/?id=7dfaa617a4

From 7dfaa617a44d28e8b04eafb7d1af2a8da26f5b26 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 30 Jun 2022 17:04:17 +0900
Subject: Use `matrix.arch` separated from `matrix.configure`

Statically determined value should be set statically.
---
 .github/workflows/ubuntu.yml | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 4aa87258f9..21bc285d7d 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -26,7 +26,8 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/ubuntu.yml#L26
         configure: ["", "cppflags=-DRUBY_DEBUG"]
         include:
           - test_task: "check"
-            configure: "--host=i686-$OSTYPE"
+            configure: ""
+            arch: i686
           - test_task: "check"
             configure: "--enable-shared --enable-load-relative"
             skipped_tests: "TestGem#test_.*_from_binstubs.*"
@@ -36,6 +37,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/ubuntu.yml#L37
     env:
       GITPULLOPTIONS: --no-tags origin ${{github.ref}}
       RUBY_DEBUG: ci
+      SETARCH: ${{ matrix.arch && format('setarch {0}', matrix.arch) }}
     runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
     if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
     steps:
@@ -46,12 +48,11 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/ubuntu.yml#L48
           configure: ${{matrix.configure}}
         run: |
           echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
-          arch=`echo " $configure" | sed '/.* --host=/!d;s///;s/[- ].*//'`
-          echo "SETARCH=${arch:+setarch $arch}" >> $GITHUB_ENV
       - name: Install libraries
+        env:
+          arch: ${{matrix.arch}}
         run: |
           set -x
-          arch="${SETARCH##* }"
           arch=${arch:+:${arch/i[3-6]86/i386}}
           ${arch:+sudo dpkg --add-architecture ${arch#:}}
           sudo apt-get update -q || :
@@ -84,7 +85,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/ubuntu.yml#L85
           arch: ${{matrix.arch}}
         run: >-
           $SETARCH ../src/configure -C --disable-install-doc ${{ matrix.configure }}
-          ${arch:+--target=$arch-$OSTYPE}
+          ${arch:+--target=$arch-$OSTYPE --host=$arch-$OSTYPE}
       - run: $SETARCH make incs
       - run: $SETARCH make
       - run: $SETARCH make leaked-globals
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]