Skip to content

Commit

Permalink
Create dummy files in build dir in setup [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Oct 3, 2023
1 parent 3b47fb2 commit 2dee266
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
16 changes: 16 additions & 0 deletions .github/actions/setup/directories/action.yml
Expand Up @@ -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:
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions .github/workflows/macos.yml
Expand Up @@ -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 }}
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ubuntu.yml
Expand Up @@ -78,6 +78,7 @@ jobs:
srcdir: src
builddir: build
makeup: true
dummy-files: ${{ matrix.test_task == 'check' }}

- name: Run configure
env:
Expand All @@ -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 }}
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/yjit-ubuntu.yml
Expand Up @@ -130,6 +130,7 @@ jobs:
srcdir: src
builddir: build
makeup: true
dummy-files: ${{ matrix.test_task == 'check' }}

- name: Install Rust
if: ${{ matrix.rust_version }}
Expand All @@ -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

Expand Down

0 comments on commit 2dee266

Please sign in to comment.