Create dummy files in build dir in setup [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2023-09-28 19:24:44 +09:00
parent 3b47fb2cb6
commit 2dee2662d8
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
4 changed files with 19 additions and 10 deletions

View File

@ -29,6 +29,13 @@ inputs:
description: >- description: >-
If set to true, additionally runs `make up`. 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? outputs: {} # nothing?
runs: runs:
@ -110,3 +117,12 @@ runs:
sudo chmod -R go-w /usr/share sudo chmod -R go-w /usr/share
chmod -v go-w $HOME $HOME/.config || : chmod -v go-w $HOME $HOME/.config || :
sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || : 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

View File

@ -69,6 +69,7 @@ jobs:
srcdir: src srcdir: src
builddir: build builddir: build
makeup: true makeup: true
dummy-files: ${{ matrix.test_task == 'check' }}
- name: Run configure - name: Run configure
run: ../src/configure -C --disable-install-doc ${{ matrix.configure }} run: ../src/configure -C --disable-install-doc ${{ matrix.configure }}

View File

@ -78,6 +78,7 @@ jobs:
srcdir: src srcdir: src
builddir: build builddir: build
makeup: true makeup: true
dummy-files: ${{ matrix.test_task == 'check' }}
- name: Run configure - name: Run configure
env: env:
@ -92,11 +93,6 @@ jobs:
- run: $SETARCH make - 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 }} - name: make ${{ matrix.test_task }}
run: >- run: >-
$SETARCH make -s ${{ matrix.test_task }} $SETARCH make -s ${{ matrix.test_task }}

View File

@ -130,6 +130,7 @@ jobs:
srcdir: src srcdir: src
builddir: build builddir: build
makeup: true makeup: true
dummy-files: ${{ matrix.test_task == 'check' }}
- name: Install Rust - name: Install Rust
if: ${{ matrix.rust_version }} if: ${{ matrix.rust_version }}
@ -145,11 +146,6 @@ jobs:
- run: make - 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 - name: Enable YJIT through ENV
run: echo "RUBY_YJIT_ENABLE=1" >> $GITHUB_ENV run: echo "RUBY_YJIT_ENABLE=1" >> $GITHUB_ENV