Skip to content

Commit

Permalink
update mruby 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pyama86 committed Sep 19, 2023
1 parent 01c4412 commit 57ef8b5
Show file tree
Hide file tree
Showing 270 changed files with 19,130 additions and 10,192 deletions.
3 changes: 2 additions & 1 deletion mruby/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ indent_style = space
trim_trailing_whitespace = true
#max_line_length = 120

# limitation to US-ASCII
[*.bat]
charset = latin1
end_of_line = crlf
indent_style = space
#max_line_length = 80

[*.{yaml,yml}]
Expand Down
2 changes: 2 additions & 0 deletions mruby/.git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
6fc5dc986a5ffc1a74c63ad0617ea1dcc10d3cdd
# reformatted doc/opcode.md
61e8a540869c57ebddac53cf9d243db407d57fff
# reindent parse.y
650ffb9d8410e1ae2206890ef6e2a8643c600454
3 changes: 0 additions & 3 deletions mruby/.github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# MD001 heading-increment/header-increment - Heading levels should only increment by one level at a time
MD001: false

# MD010 no-hard-tabs - Hard tabs
MD010: false

# MD013 line-length - Line length
MD013: false

Expand Down
152 changes: 24 additions & 128 deletions mruby/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,154 +2,50 @@ name: Build & Test

on: [push, pull_request]

jobs:
Ubuntu-1804-gcc:
runs-on: ubuntu-18.04
timeout-minutes: 10
env:
MRUBY_CONFIG: ci/gcc-clang
CC: gcc
steps:
- uses: actions/checkout@v2.4.0
- name: Ruby version
run: ruby -v
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
run: rake -m test:build && rake test:run

Ubuntu-1804-clang:
runs-on: ubuntu-18.04
timeout-minutes: 10
env:
MRUBY_CONFIG: ci/gcc-clang
CC: clang
steps:
- uses: actions/checkout@v2.4.0
- name: Ruby version
run: ruby -v
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
run: rake -m test:build && rake test:run

Ubuntu-2004-gcc:
runs-on: ubuntu-20.04
timeout-minutes: 10
env:
MRUBY_CONFIG: ci/gcc-clang
CC: gcc
steps:
- uses: actions/checkout@v2.4.0
- name: Ruby version
run: ruby -v
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
run: rake -m test:build && rake test:run

Ubuntu-2004-clang:
runs-on: ubuntu-20.04
timeout-minutes: 10
env:
MRUBY_CONFIG: ci/gcc-clang
CC: clang
steps:
- uses: actions/checkout@v2.4.0
- name: Ruby version
run: ruby -v
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
run: rake -m test:build && rake test:run
permissions:
contents: read

macOS:
runs-on: macos-latest
timeout-minutes: 10
env:
MRUBY_CONFIG: ci/gcc-clang
CC: clang
steps:
- uses: actions/checkout@v2.4.0
- name: Ruby version
run: ruby -v
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
run: rake -m test:build && rake test:run

Windows-MinGW:
runs-on: windows-latest
jobs:
GCC-CLANG:
name: "${{ matrix.os }}-${{ matrix.altname || matrix.cc }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
max-parallel: 8
matrix:
include:
- {os: ubuntu-22.04, cc: gcc, cxx: g++}
- {os: ubuntu-22.04, cc: clang, cxx: clang++}
- {os: ubuntu-20.04, cc: gcc, cxx: g++}
- {os: ubuntu-20.04, cc: clang, cxx: clang++}
- {os: macos-latest, cc: clang, cxx: clang++}
- {os: windows-latest, cc: gcc, cxx: g++, altname: "mingw-gcc"}
env:
MRUBY_CONFIG: ci/gcc-clang
CC: gcc
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
LD: ${{ matrix.cc }}
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- name: Ruby version
run: ruby -v
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
run: rake -m test:build && rake test:run

Windows-Cygwin:
runs-on: windows-latest
timeout-minutes: 15
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MRUBY_CONFIG: ci/gcc-clang
CC: gcc
installer-path: '%TMP%\cygwin-setup.exe'
cygwin-root: C:\cygwin
package-dir: C:\cygwin-package
cache-version: v1
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/cache@v2.1.7
with:
path: ${{ env.package-dir }}
key: ${{ runner.os }}-cygwin-${{ env.cache-version }}
- name: Download Cygwin installer
shell: cmd
run: >
bitsadmin /transfer download /priority foreground
https://cygwin.com/setup-x86_64.exe ${{ env.installer-path }}
- name: Install Cygwin
shell: cmd
run: >
${{ env.installer-path }}
--quiet-mode --no-shortcuts --no-startmenu --no-desktop --no-admin
--only-site --site http://mirrors.kernel.org/sourceware/cygwin/
--root ${{ env.cygwin-root }}
--local-package-dir ${{ env.package-dir }}
--packages gcc-core,gcc-g++,ruby
- name: Set PATH for Cygwin
run: |
echo '::set-env name=PATH::${{ env.cygwin-root }}\bin;${{ env.cygwin-root }}\usr\bin'
- name: Ruby version
shell: cmd
run: ruby -v
- name: Compiler version
run: ${{ env.CC }} --version
- name: Build and test
shell: cmd
run: ruby /usr/bin/rake -m test:build && ruby /usr/bin/rake test:run
- name: Set PATH for cache archiving (tar)
# set Windows path so that Cygwin tar is not used for cache archiving
run: echo '::set-env name=PATH::C:\windows\System32'

Windows-VC:
runs-on: windows-latest
runs-on: windows-2022
timeout-minutes: 10
env:
MRUBY_CONFIG: ci/msvc
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- name: Ruby version
run: ruby -v
- name: Build and test
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
rake -m test:build && rake test:run
21 changes: 14 additions & 7 deletions mruby/.github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
name: "Code scanning - action"
name: Code scanning - action

on:
push:
branches-ignore:
- dependabot/**
pull_request:
schedule:
- cron: '0 19 * * 4'

permissions:
contents: read

jobs:
CodeQL-Build:

permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -43,4 +50,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
14 changes: 9 additions & 5 deletions mruby/.github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,33 @@ name: Lint

on: [pull_request]

permissions:
contents: read

jobs:
misspell:
name: Check spelling with misspell
runs-on: ubuntu-latest
steps:
- name: Check Out
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
- name: Install
run: wget -O - -q https://git.io/misspell | sh -s -- -b .
- name: Misspell
- name: Run misspell
run: git ls-files --empty-directory | xargs ./misspell -error
pre-commit:
name: Run pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: Check merge conflict
- name: Check Out
uses: actions/checkout@v3
- name: Install
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v2.1.7
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
Expand Down
5 changes: 4 additions & 1 deletion mruby/.github/workflows/oss-fuzz.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: CIFuzz
on: [pull_request]
permissions:
contents: read

jobs:
Fuzzing:
runs-on: ubuntu-latest
Expand All @@ -16,7 +19,7 @@ jobs:
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v2.3.1
uses: actions/upload-artifact@v3
if: failure()
with:
name: artifacts
Expand Down
26 changes: 17 additions & 9 deletions mruby/.github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
name: Super Linter
name: Super-Linter

on:
push:
branches-ignore: [master]
# Remove the line above to run when pushing to master
pull_request:
branches: [master]
on: [pull_request]

permissions:
contents: read

jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
statuses: write # for github/super-linter/slim to mark status of each linter run
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: github/super-linter@v4.8.5
- name: Checkout Code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter/slim@v4.10.1
env:
ERROR_ON_MISSING_EXEC_BIT: true
VALIDATE_BASH: true
# VALIDATE_BASH_EXEC: true
# VALIDATE_EDITORCONFIG: true
# VALIDATE_SHELL_SHFMT: true
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
Loading

0 comments on commit 57ef8b5

Please sign in to comment.