зеркало из https://github.com/github/ruby.git
refactor extract mkdir
Everyone does `mkdir build; src/autogen.sh`; why not merge them.
This commit is contained in:
Родитель
6f4c8d1dcf
Коммит
420d069cc2
|
@ -0,0 +1,111 @@
|
|||
name: Setup directories etc.
|
||||
description: >-
|
||||
Set up the source code and build directories (plus some
|
||||
environmental tweaks)
|
||||
|
||||
inputs:
|
||||
srcdir:
|
||||
required: false
|
||||
default: ${{ github.workspace }}
|
||||
description: >-
|
||||
Directory to (re-)checkout source codes. This will be created
|
||||
if absent. If there is no `configure` file that is also
|
||||
generated inside.
|
||||
|
||||
builddir:
|
||||
required: false
|
||||
default: ${{ github.workspace }}
|
||||
description: >-
|
||||
Where binaries and other generated contents go. This will be
|
||||
created if absent.
|
||||
|
||||
makeup:
|
||||
required: false
|
||||
type: boolean
|
||||
# Note that `default: false` evaluates to a string constant
|
||||
# `'false'`, which is a truthy value :sigh:
|
||||
# https://github.com/actions/runner/issues/2238
|
||||
default: ''
|
||||
description: >-
|
||||
If set to true, additionally runs `make up`.
|
||||
|
||||
outputs: {} # nothing?
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
|
||||
steps:
|
||||
# Note that `shell: bash` works on both Windows and Linux, but not
|
||||
# `shell: sh`. This is because GitHub hosted Windows runners have
|
||||
# their bash manually installed.
|
||||
- shell: bash
|
||||
run: |
|
||||
mkdir -p ${{ inputs.srcdir }}
|
||||
mkdir -p ${{ inputs.builddir }}
|
||||
|
||||
# Did you know that actions/checkout works without git(1)? We are
|
||||
# checking that here.
|
||||
- id: which
|
||||
shell: bash
|
||||
run: |
|
||||
echo "git=`command -v git`" >> "$GITHUB_OUTPUT"
|
||||
echo "sudo=`command -v sudo`" >> "$GITHUB_OUTPUT"
|
||||
echo "autoreconf=`command -v autoreconf`" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- if: steps.which.outputs.git
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global core.autocrlf false
|
||||
git config --global core.eol lf
|
||||
git config --global advice.detachedHead 0
|
||||
git config --global init.defaultBranch garbage
|
||||
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
path: ${{ inputs.srcdir }}
|
||||
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
with:
|
||||
path: ${{ inputs.srcdir }}/.downloaded-cache
|
||||
key: downloaded-cache
|
||||
|
||||
- if: steps.which.outputs.autoreconf
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.srcdir }}
|
||||
run: ./autogen.sh
|
||||
|
||||
# This is for MinGW.
|
||||
- if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: echo "GNUMAKEFLAGS=-j$((2 * NUMBER_OF_PROCESSORS))" >> $GITHUB_ENV
|
||||
|
||||
- if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: echo "GNUMAKEFLAGS=-sj$((1 + $(nproc --all)))" >> "$GITHUB_ENV"
|
||||
|
||||
# macOS' GNU make is so old that they doesn't understand `GNUMAKEFLAGS`.
|
||||
- if: runner.os == 'macOS'
|
||||
shell: bash
|
||||
run: echo "MAKEFLAGS=-j$((1 + $(sysctl -n hw.activecpu)))" >> "$GITHUB_ENV"
|
||||
|
||||
- if: inputs.makeup
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.srcdir }}
|
||||
run: |
|
||||
touch config.status
|
||||
touch rbconfig.time
|
||||
sed -f tool/prereq.status template/Makefile.in common.mk > Makefile
|
||||
make up
|
||||
|
||||
# Cleanup, runs even on failure
|
||||
- if: always() && inputs.makeup
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.srcdir }}
|
||||
run: rm -f config.status Makefile rbconfig.rb .rbconfig.time
|
||||
|
||||
- if: steps.which.outputs.sudo
|
||||
shell: bash
|
||||
run: |
|
||||
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' || :
|
|
@ -94,25 +94,15 @@ jobs:
|
|||
steps:
|
||||
- run: id
|
||||
working-directory:
|
||||
- run: mkdir build
|
||||
working-directory:
|
||||
- name: setenv
|
||||
run: |
|
||||
echo "GNUMAKEFLAGS=-sj$((1 + $(nproc --all)))" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
path: src
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: /.github
|
||||
- uses: ./.github/actions/setup/directories
|
||||
with:
|
||||
path: src/.downloaded-cache
|
||||
key: downloaded-cache
|
||||
- name: autogen
|
||||
run: |
|
||||
if [ ! -f ./autogen.sh ]; then
|
||||
ls -la
|
||||
fi
|
||||
./autogen.sh
|
||||
working-directory: src
|
||||
srcdir: src
|
||||
builddir: build
|
||||
makeup: true
|
||||
- name: Run configure
|
||||
run: >
|
||||
../src/configure -C ${default_configure} ${append_configure}
|
||||
|
@ -122,8 +112,6 @@ jobs:
|
|||
matrix.entry.crosshost || '"${default_cc}${append_cc:+ $append_cc}"'
|
||||
}}
|
||||
--${{ matrix.entry.shared || 'enable' }}-shared
|
||||
- run: make extract-extlibs
|
||||
- run: make incs
|
||||
- run: make showflags
|
||||
- run: make
|
||||
- run: make test
|
||||
|
@ -136,8 +124,7 @@ jobs:
|
|||
# env:
|
||||
# CHECK_LEAKS: true
|
||||
- run: make test-annocheck
|
||||
|
||||
- uses: ./src/.github/actions/slack
|
||||
- uses: ./.github/actions/slack
|
||||
with:
|
||||
label: ${{ matrix.entry.name }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
||||
|
|
|
@ -46,21 +46,16 @@ jobs:
|
|||
- ruby-3.2
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
with:
|
||||
path: .downloaded-cache
|
||||
key: downloaded-cache
|
||||
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
bundler: none
|
||||
- run: echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
- uses: ./.github/actions/setup/ubuntu
|
||||
- run: ./autogen.sh
|
||||
- uses: ./.github/actions/setup/directories
|
||||
with:
|
||||
makeup: true
|
||||
- run: ./configure --disable-install-doc
|
||||
- run: make common-srcs
|
||||
- run: make incs
|
||||
- run: make all
|
||||
- run: make test
|
||||
- uses: ./.github/actions/slack
|
||||
|
|
|
@ -31,25 +31,14 @@ jobs:
|
|||
name: update ${{ github.workflow }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global advice.detachedHead 0
|
||||
git config --global init.defaultBranch garbage
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
|
||||
- uses: ./.github/actions/setup/directories
|
||||
|
||||
- name: Set ENV
|
||||
run: |
|
||||
echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
|
||||
echo "TODAY=$(date +%F)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
with:
|
||||
path: .downloaded-cache
|
||||
key: downloaded-cache-${{ github.sha }}
|
||||
restore-keys: |
|
||||
downloaded-cache
|
||||
|
||||
- name: Download previous gems list
|
||||
run: |
|
||||
data=bundled_gems.json
|
||||
|
|
|
@ -38,20 +38,12 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
|
||||
steps:
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global advice.detachedHead 0
|
||||
git config --global init.defaultBranch garbage
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
- uses: ./.github/actions/setup/ubuntu
|
||||
if: ${{ contains(matrix.os, 'ubuntu') }}
|
||||
- uses: ./.github/actions/setup/macos
|
||||
if: ${{ contains(matrix.os, 'macos') }}
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
with:
|
||||
path: .downloaded-cache
|
||||
key: downloaded-cache
|
||||
- run: ./autogen.sh
|
||||
- uses: ./.github/actions/setup/directories
|
||||
- name: Run configure
|
||||
run: ./configure -C --disable-install-doc --disable-rubygems --with-gcc 'optflags=-O0' 'debugflags=-save-temps=obj -g'
|
||||
- run: make all golf
|
||||
|
|
|
@ -15,6 +15,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
- uses: ./.github/actions/setup/directories
|
||||
- name: Check if C-sources are US-ASCII
|
||||
run: |
|
||||
grep -r -n '[^ -~]' -- *.[chy] include internal win32/*.[ch] && exit 1 || :
|
||||
|
@ -40,14 +41,6 @@ jobs:
|
|||
run: true
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
with:
|
||||
path: .downloaded-cache
|
||||
key: downloaded-cache-${{ github.sha }}
|
||||
restore-keys: |
|
||||
downloaded-cache
|
||||
if: steps.gems.outcome == 'success'
|
||||
|
||||
- name: Download previous gems list
|
||||
run: |
|
||||
data=default_gems.json
|
||||
|
|
|
@ -53,10 +53,7 @@ jobs:
|
|||
- name: Install libraries
|
||||
uses: ./.github/actions/setup/ubuntu
|
||||
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
with:
|
||||
path: .downloaded-cache
|
||||
key: downloaded-cache
|
||||
- uses: ./.github/actions/setup/directories
|
||||
|
||||
- name: Remove an obsolete rubygems vendored file
|
||||
run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb
|
||||
|
@ -66,9 +63,6 @@ jobs:
|
|||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: Set ENV
|
||||
run: echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
|
||||
|
||||
|
|
|
@ -215,28 +215,18 @@ jobs:
|
|||
steps:
|
||||
- run: id
|
||||
working-directory:
|
||||
- run: mkdir build
|
||||
working-directory:
|
||||
- name: setenv
|
||||
run: |
|
||||
echo "GNUMAKEFLAGS=-sj$((1 + $(nproc --all)))" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
path: src
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: /.github
|
||||
- uses: ./.github/actions/setup/directories
|
||||
with:
|
||||
path: src/.downloaded-cache
|
||||
key: downloaded-cache
|
||||
srcdir: src
|
||||
builddir: build
|
||||
makeup: true
|
||||
- name: Install Rust
|
||||
if: ${{ matrix.entry.rust }}
|
||||
run: sudo apt-get update && sudo apt install -y rustc
|
||||
- name: autogen
|
||||
run: |
|
||||
if [ ! -f ./autogen.sh ]; then
|
||||
ls -la
|
||||
fi
|
||||
./autogen.sh
|
||||
working-directory: src
|
||||
- name: Run configure
|
||||
run: >
|
||||
../src/configure -C ${default_configure} ${append_configure}
|
||||
|
@ -249,8 +239,6 @@ jobs:
|
|||
- name: Add to ext/Setup # statically link just the etc extension
|
||||
run: mkdir ext && echo etc >> ext/Setup
|
||||
if: ${{ matrix.entry.name == 'ext/Setup' }}
|
||||
- run: make extract-extlibs
|
||||
- run: make incs
|
||||
- run: make showflags
|
||||
- run: make
|
||||
- run: make test
|
||||
|
@ -267,7 +255,7 @@ jobs:
|
|||
- run: make test-annocheck
|
||||
if: ${{ matrix.entry.check && endsWith(matrix.entry.name, 'annocheck') }}
|
||||
|
||||
- uses: ./src/.github/actions/slack
|
||||
- uses: ./.github/actions/slack
|
||||
with:
|
||||
label: ${{ matrix.entry.name }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
||||
|
|
|
@ -43,33 +43,25 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
|
||||
steps:
|
||||
- run: mkdir build
|
||||
working-directory:
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global advice.detachedHead 0
|
||||
git config --global init.defaultBranch garbage
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
path: src
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
with:
|
||||
path: src/.downloaded-cache
|
||||
key: downloaded-cache
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: /.github
|
||||
- name: Install libraries
|
||||
uses: ./src/.github/actions/setup/macos
|
||||
uses: ./.github/actions/setup/macos
|
||||
- uses: ./.github/actions/setup/directories
|
||||
with:
|
||||
srcdir: src
|
||||
builddir: build
|
||||
makeup: true
|
||||
- name: Set ENV
|
||||
run: |
|
||||
echo "MAKEFLAGS=-j$((1 + $(sysctl -n hw.activecpu)))" >> $GITHUB_ENV
|
||||
for lib in openssl@1.1 readline; do
|
||||
CONFIGURE_ARGS="${CONFIGURE_ARGS:+$CONFIGURE_ARGS }--with-${lib%@*}-dir=$(brew --prefix $lib)"
|
||||
done
|
||||
echo CONFIGURE_ARGS="${CONFIGURE_ARGS}" >> $GITHUB_ENV
|
||||
- run: ./autogen.sh
|
||||
working-directory: src
|
||||
- name: Run configure
|
||||
run: ../src/configure -C --disable-install-doc
|
||||
- run: make incs
|
||||
- run: make prepare-gems
|
||||
if: ${{ matrix.test_task == 'test-bundled-gems' }}
|
||||
- run: make
|
||||
|
@ -92,7 +84,7 @@ jobs:
|
|||
PRECHECK_BUNDLED_GEMS: "no"
|
||||
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests != '' }}
|
||||
continue-on-error: ${{ matrix.continue-on-skipped_tests || false }}
|
||||
- uses: ./src/.github/actions/slack
|
||||
- uses: ./.github/actions/slack
|
||||
with:
|
||||
label: ${{ matrix.test_task }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
||||
|
|
|
@ -56,28 +56,10 @@ jobs:
|
|||
fail-fast: false
|
||||
if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
|
||||
steps:
|
||||
- run: mkdir build
|
||||
working-directory:
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global core.autocrlf false
|
||||
git config --global core.eol lf
|
||||
git config --global advice.detachedHead 0
|
||||
git config --global init.defaultBranch garbage
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
path: src
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
with:
|
||||
path: src/.downloaded-cache
|
||||
key: downloaded-cache
|
||||
- name: Set up Ruby & MSYS2
|
||||
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
|
||||
with:
|
||||
ruby-version: ${{ matrix.base_ruby }}
|
||||
- name: set env
|
||||
run: |
|
||||
echo "GNUMAKEFLAGS=-j$((2 * NUMBER_OF_PROCESSORS))" >> $GITHUB_ENV
|
||||
|
||||
- name: where check
|
||||
run: |
|
||||
|
@ -91,6 +73,7 @@ jobs:
|
|||
echo '##['endgroup']'
|
||||
done
|
||||
$result
|
||||
working-directory:
|
||||
|
||||
- name: version check
|
||||
run: |
|
||||
|
@ -103,38 +86,34 @@ jobs:
|
|||
echo '##['endgroup']'
|
||||
done
|
||||
$result
|
||||
working-directory:
|
||||
|
||||
- name: autogen
|
||||
run: |
|
||||
./autogen.sh
|
||||
working-directory: src
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: /.github
|
||||
|
||||
- uses: ./.github/actions/setup/directories
|
||||
with:
|
||||
srcdir: src
|
||||
builddir: build
|
||||
makeup: true
|
||||
|
||||
- name: configure
|
||||
run: >
|
||||
../src/configure --disable-install-doc --prefix=/.
|
||||
--build=$CHOST --host=$CHOST --target=$CHOST
|
||||
|
||||
- name: update
|
||||
run: |
|
||||
make incs
|
||||
|
||||
- name: download gems
|
||||
run: |
|
||||
make update-gems
|
||||
|
||||
- name: make all
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
make
|
||||
run: make
|
||||
|
||||
- name: make install
|
||||
run: |
|
||||
make DESTDIR=../install install-nodoc
|
||||
run: make DESTDIR=../install install-nodoc
|
||||
|
||||
- name: test
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
make test
|
||||
run: make test
|
||||
env:
|
||||
GNUMAKEFLAGS: ""
|
||||
RUBY_TESTOPTS: "-v --tty=no"
|
||||
|
|
|
@ -39,44 +39,28 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
|
||||
steps:
|
||||
- run: mkdir build
|
||||
working-directory:
|
||||
- name: Set ENV
|
||||
run: |
|
||||
echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
|
||||
with:
|
||||
ruby-version: '3.1'
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global advice.detachedHead 0
|
||||
git config --global init.defaultBranch garbage
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
path: src
|
||||
- name: Install libraries
|
||||
uses: ./src/.github/actions/setup/ubuntu
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: /.github
|
||||
- uses: ./.github/actions/setup/ubuntu
|
||||
- uses: ./.github/actions/setup/directories
|
||||
with:
|
||||
path: src/.downloaded-cache
|
||||
key: downloaded-cache
|
||||
- name: Fixed world writable dirs
|
||||
run: |
|
||||
chmod -v go-w $HOME $HOME/.config
|
||||
sudo chmod -R go-w /usr/share
|
||||
sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || :
|
||||
- run: ./autogen.sh
|
||||
working-directory: src
|
||||
srcdir: src
|
||||
builddir: build
|
||||
makeup: true
|
||||
- name: Run configure
|
||||
run: ../src/configure -C --disable-install-doc --prefix=$(pwd)/install --enable-yjit=dev_nodebug
|
||||
- run: make incs
|
||||
- run: make
|
||||
- run: make install
|
||||
- run: make ${{ matrix.task }}
|
||||
- run: git diff --exit-code
|
||||
working-directory: src
|
||||
- uses: ./src/.github/actions/slack
|
||||
- uses: ./.github/actions/slack
|
||||
with:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
||||
if: ${{ failure() && github.event_name == 'push' }}
|
||||
|
|
|
@ -48,31 +48,16 @@ jobs:
|
|||
runs-on: ubuntu-22.04
|
||||
if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
|
||||
steps:
|
||||
- run: mkdir build
|
||||
working-directory:
|
||||
- name: Set ENV
|
||||
run: |
|
||||
echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global advice.detachedHead 0
|
||||
git config --global init.defaultBranch garbage
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.1.0
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
path: src
|
||||
- name: Install libraries
|
||||
uses: ./src/.github/actions/setup/ubuntu
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.0.11
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: /.github
|
||||
- uses: ./.github/actions/setup/ubuntu
|
||||
- uses: ./.github/actions/setup/directories
|
||||
with:
|
||||
path: src/.downloaded-cache
|
||||
key: downloaded-cache
|
||||
- name: Fixed world writable dirs
|
||||
run: |
|
||||
chmod -v go-w $HOME $HOME/.config
|
||||
sudo chmod -R go-w /usr/share
|
||||
sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || :
|
||||
- run: ./autogen.sh
|
||||
working-directory: src
|
||||
srcdir: src
|
||||
builddir: build
|
||||
makeup: true
|
||||
- name: Run configure
|
||||
env:
|
||||
arch: ${{matrix.arch}}
|
||||
|
@ -103,7 +88,7 @@ jobs:
|
|||
env:
|
||||
GNUMAKEFLAGS: ""
|
||||
RUN_OPTS: ${{ matrix.run_opts }}
|
||||
- uses: ./src/.github/actions/slack
|
||||
- uses: ./.github/actions/slack
|
||||
with:
|
||||
label: ${{ matrix.run_opts }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
||||
|
|
|
@ -54,32 +54,18 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
|
||||
steps:
|
||||
- run: mkdir build
|
||||
working-directory:
|
||||
- name: Set ENV
|
||||
run: |
|
||||
echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global advice.detachedHead 0
|
||||
git config --global init.defaultBranch garbage
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
path: src
|
||||
- uses: ./src/.github/actions/setup/ubuntu
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: /.github
|
||||
- uses: ./.github/actions/setup/ubuntu
|
||||
with:
|
||||
arch: ${{matrix.arch}}
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
- uses: ./.github/actions/setup/directories
|
||||
with:
|
||||
path: src/.downloaded-cache
|
||||
key: downloaded-cache
|
||||
- name: Fixed world writable dirs
|
||||
run: |
|
||||
chmod -v go-w $HOME $HOME/.config
|
||||
sudo chmod -R go-w /usr/share
|
||||
sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || :
|
||||
- run: ./autogen.sh
|
||||
working-directory: src
|
||||
srcdir: src
|
||||
builddir: build
|
||||
makeup: true
|
||||
- name: Run configure
|
||||
env:
|
||||
arch: ${{matrix.arch}}
|
||||
|
@ -87,7 +73,6 @@ jobs:
|
|||
run: >-
|
||||
$SETARCH ../src/configure -C --disable-install-doc ${configure:-cppflags=-DRUBY_DEBUG}
|
||||
${arch:+--target=$arch-$OSTYPE --host=$arch-$OSTYPE}
|
||||
- run: $SETARCH make incs
|
||||
- run: $SETARCH make prepare-gems
|
||||
if: ${{ matrix.test_task == 'test-bundled-gems' }}
|
||||
- run: $SETARCH make
|
||||
|
@ -115,7 +100,7 @@ jobs:
|
|||
TESTS: ${{ matrix.skipped_tests }}
|
||||
if: ${{ matrix.test_task == 'check' && matrix.skipped_tests != '' }}
|
||||
continue-on-error: ${{ matrix.continue-on-skipped_tests || false }}
|
||||
- uses: ./src/.github/actions/slack
|
||||
- uses: ./.github/actions/slack
|
||||
with:
|
||||
label: ${{ matrix.test_task }} ${{ matrix.configure }}${{ matrix.arch }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
||||
|
|
|
@ -53,15 +53,15 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
|
||||
steps:
|
||||
- run: mkdir build
|
||||
working-directory:
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global advice.detachedHead 0
|
||||
git config --global init.defaultBranch garbage
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
path: src
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: /.github
|
||||
- uses: ./.github/actions/setup/directories
|
||||
with:
|
||||
srcdir: src
|
||||
builddir: build
|
||||
makeup: true
|
||||
- name: Install libraries
|
||||
run: |
|
||||
set -ex
|
||||
|
@ -87,10 +87,7 @@ jobs:
|
|||
working-directory: src
|
||||
- name: Set ENV
|
||||
run: |
|
||||
echo "MAKEFLAGS=-j$((1 + $(sysctl -n hw.activecpu)))" >> $GITHUB_ENV
|
||||
echo "WASI_SDK_PATH=/opt/wasi-sdk" >> $GITHUB_ENV
|
||||
- run: ./autogen.sh
|
||||
working-directory: src
|
||||
- name: Run configure
|
||||
run: |
|
||||
../src/configure \
|
||||
|
@ -103,7 +100,6 @@ jobs:
|
|||
optflags="${{ matrix.entry.optflags }}" \
|
||||
debugflags="${{ matrix.entry.debugflags }}" \
|
||||
wasmoptflags="${{ matrix.entry.wasmoptflags }} ${{ matrix.entry.debugflags }}"
|
||||
|
||||
# miniruby may not be built when cross-compling
|
||||
- run: make mini ruby
|
||||
- name: Run basictest
|
||||
|
@ -114,8 +110,7 @@ jobs:
|
|||
NO_THREAD_TESTS="$(grep -L Thread -R ./bootstraptest | awk -F/ '{ print $NF }' | uniq | sed -n 's/test_\(.*\).rb/\1/p' | paste -s -d, -)"
|
||||
ruby ./bootstraptest/runner.rb --ruby="$(which wasmtime) run $PWD/../build/ruby --mapdir /::./ -- " --verbose "--sets=$NO_THREAD_TESTS"
|
||||
working-directory: src
|
||||
|
||||
- uses: ./src/.github/actions/slack
|
||||
- uses: ./.github/actions/slack
|
||||
with:
|
||||
label: ${{ matrix.name }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
||||
|
|
|
@ -84,19 +84,14 @@ jobs:
|
|||
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
|
||||
Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH
|
||||
shell: pwsh
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global core.autocrlf false
|
||||
git config --global core.eol lf
|
||||
git config --global advice.detachedHead 0
|
||||
git config --global init.defaultBranch garbage
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
path: src
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: /.github
|
||||
- uses: ./.github/actions/setup/directories
|
||||
with:
|
||||
path: src/.downloaded-cache
|
||||
key: downloaded-cache
|
||||
srcdir: src
|
||||
builddir: build
|
||||
- name: setup env
|
||||
# %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
|
||||
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
|
||||
|
@ -140,7 +135,7 @@ jobs:
|
|||
env:
|
||||
RUBY_TESTOPTS: -j${{env.TEST_JOBS}} --job-status=normal
|
||||
timeout-minutes: 60
|
||||
- uses: ./src/.github/actions/slack
|
||||
- uses: ./.github/actions/slack
|
||||
with:
|
||||
label: VS${{ matrix.vs }} / ${{ matrix.test_task || 'check' }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
||||
|
|
|
@ -97,39 +97,25 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
|
||||
steps:
|
||||
- run: mkdir build
|
||||
working-directory:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: /.github
|
||||
- uses: ./.github/actions/setup/ubuntu
|
||||
- uses: ./.github/actions/setup/directories
|
||||
with:
|
||||
srcdir: src
|
||||
builddir: build
|
||||
makeup: true
|
||||
- name: Install Rust
|
||||
if: ${{ matrix.rust_version }}
|
||||
run: rustup install ${{ matrix.rust_version }} --profile minimal
|
||||
- name: git config
|
||||
run: |
|
||||
git config --global advice.detachedHead 0
|
||||
git config --global init.defaultBranch garbage
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
path: src
|
||||
- uses: ./src/.github/actions/setup/ubuntu
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
||||
with:
|
||||
path: src/.downloaded-cache
|
||||
key: downloaded-cache
|
||||
- name: Fixed world writable dirs
|
||||
run: |
|
||||
chmod -v go-w $HOME $HOME/.config
|
||||
sudo chmod -R go-w /usr/share
|
||||
sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || :
|
||||
- name: Set ENV
|
||||
run: |
|
||||
echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
|
||||
- run: ./autogen.sh
|
||||
working-directory: src
|
||||
- name: Run configure
|
||||
run: ../src/configure -C --disable-install-doc --prefix=$(pwd)/install ${{ matrix.configure }}
|
||||
- run: make incs
|
||||
- run: make prepare-gems
|
||||
if: ${{ matrix.test_task == 'test-bundled-gems' }}
|
||||
- run: make -j
|
||||
- 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)")}'
|
||||
|
@ -154,8 +140,7 @@ jobs:
|
|||
BASE_REPO: ${{ github.event.pull_request.base.repo.full_name }}
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
if: ${{ matrix.test_task == 'yjit-bench' && startsWith(github.event_name, 'pull') }}
|
||||
|
||||
- uses: ./src/.github/actions/slack
|
||||
- uses: ./.github/actions/slack
|
||||
with:
|
||||
label: ${{ matrix.test_task }} ${{ matrix.configure }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
||||
|
|
Загрузка…
Ссылка в новой задаче