aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-28 19:24:44 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-10-03 13:10:01 +0900
commit2dee2662d8d8b54a21c18c584a3f6ed319eb8eb5 (patch)
treeabdf779a7ebe2d8249e82b77edbb3c62597f71ff
parent3b47fb2cb65336481ab339c612cc01d87a12c028 (diff)
downloadruby-2dee2662d8d8b54a21c18c584a3f6ed319eb8eb5.tar.gz
Create dummy files in build dir in setup [ci skip]
-rw-r--r--.github/actions/setup/directories/action.yml16
-rw-r--r--.github/workflows/macos.yml1
-rw-r--r--.github/workflows/ubuntu.yml6
-rw-r--r--.github/workflows/yjit-ubuntu.yml6
4 files changed, 19 insertions, 10 deletions
diff --git a/.github/actions/setup/directories/action.yml b/.github/actions/setup/directories/action.yml
index ea5f2720ef..2878fa0933 100644
--- a/.github/actions/setup/directories/action.yml
+++ b/.github/actions/setup/directories/action.yml
@@ -29,6 +29,13 @@ inputs:
description: >-
If set to true, additionally runs `make up`.
+ dummy-files:
+ required: false
+ type: boolean
+ default: ''
+ description: >-
+ If set to true, creates dummy files in build dir.
+
outputs: {} # nothing?
runs:
@@ -110,3 +117,12 @@ runs:
sudo chmod -R go-w /usr/share
chmod -v go-w $HOME $HOME/.config || :
sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || :
+
+ - if: inputs.dummy-files == 'true'
+ shell: bash
+ working-directory: ${{ inputs.builddir }}
+ run: |
+ : Create dummy files in build dir
+ for basename in {a..z} {A..Z} {0..9} foo bar test zzz; do
+ echo > ${basename}.rb "raise %(do not load ${basename}.rb)"
+ done
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index ca5e5d9aa7..e235941503 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -69,6 +69,7 @@ jobs:
srcdir: src
builddir: build
makeup: true
+ dummy-files: ${{ matrix.test_task == 'check' }}
- name: Run configure
run: ../src/configure -C --disable-install-doc ${{ matrix.configure }}
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 0548e1b420..2709b0d949 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -78,6 +78,7 @@ jobs:
srcdir: src
builddir: build
makeup: true
+ dummy-files: ${{ matrix.test_task == 'check' }}
- name: Run configure
env:
@@ -92,11 +93,6 @@ jobs:
- run: $SETARCH make
- - name: Create dummy files in build dir
- run: |
- $SETARCH ./miniruby -e '(("a".."z").to_a+("A".."Z").to_a+("0".."9").to_a+%w[foo bar test zzz]).each{|basename|File.write("#{basename}.rb", "raise %(do not load #{basename}.rb)")}'
- if: ${{ matrix.test_task == 'check' }}
-
- name: make ${{ matrix.test_task }}
run: >-
$SETARCH make -s ${{ matrix.test_task }}
diff --git a/.github/workflows/yjit-ubuntu.yml b/.github/workflows/yjit-ubuntu.yml
index 4a3d4dc61a..7567a45089 100644
--- a/.github/workflows/yjit-ubuntu.yml
+++ b/.github/workflows/yjit-ubuntu.yml
@@ -130,6 +130,7 @@ jobs:
srcdir: src
builddir: build
makeup: true
+ dummy-files: ${{ matrix.test_task == 'check' }}
- name: Install Rust
if: ${{ matrix.rust_version }}
@@ -145,11 +146,6 @@ jobs:
- run: make
- - name: Create dummy files in build dir
- run: |
- ./miniruby -e '(("a".."z").to_a+("A".."Z").to_a+("0".."9").to_a+%w[foo bar test zzz]).each{|basename|File.write("#{basename}.rb", "raise %(do not load #{basename}.rb)")}'
- if: ${{ matrix.test_task == 'check' }}
-
- name: Enable YJIT through ENV
run: echo "RUBY_YJIT_ENABLE=1" >> $GITHUB_ENV