summaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/dependabot.yml10
-rw-r--r--.github/linters/.ecrc12
-rw-r--r--.github/linters/.markdown-lint.yml26
-rw-r--r--.github/linters/.yaml-lint.yml9
-rw-r--r--.github/workflows/build.yml155
-rw-r--r--.github/workflows/codeql-analysis.yml46
-rw-r--r--.github/workflows/lint.yml32
-rw-r--r--.github/workflows/oss-fuzz.yml23
-rw-r--r--.github/workflows/super-linter.yml23
9 files changed, 336 insertions, 0 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 000000000..dac4cac33
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,10 @@
+# Basic set up
+
+version: 2
+updates:
+
+ # Maintain dependencies for GitHub Actions
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "daily"
diff --git a/.github/linters/.ecrc b/.github/linters/.ecrc
new file mode 100644
index 000000000..fb885d02a
--- /dev/null
+++ b/.github/linters/.ecrc
@@ -0,0 +1,12 @@
+{
+ "verbose": false,
+ "ignore_defaults": false,
+ "exclude": ["oss-fuzz/", "src/"],
+ "disable": {
+ "end_of_line": false,
+ "trim_trailing_whitespace": false,
+ "insert_final_newline": false,
+ "indent_size": true,
+ "indent_style": true
+ }
+}
diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml
new file mode 100644
index 000000000..a1023acbd
--- /dev/null
+++ b/.github/linters/.markdown-lint.yml
@@ -0,0 +1,26 @@
+# https://github.com/DavidAnson/markdownlint#rules--aliases
+# markdownlint -c .github/linters/.markdown-lint.yml .
+
+# 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
+
+# MD014 commands-show-output - Dollar signs used before commands without showing output
+MD014: false
+
+# MD024 no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
+MD024: false
+
+# MD025 single-title/single-h1 - Multiple top-level headings in the same document
+MD025: false
+
+# MD026 no-trailing-punctuation - Trailing punctuation in heading
+MD026: false
+
+# MD040 fenced-code-language - Fenced code blocks should have a language specified
+MD040: false
diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml
new file mode 100644
index 000000000..be4c88798
--- /dev/null
+++ b/.github/linters/.yaml-lint.yml
@@ -0,0 +1,9 @@
+---
+# https://yamllint.readthedocs.io/en/stable/
+# yamllint --strict -c .github/linters/.yaml-lint.yml .
+extends: default
+
+rules:
+ document-start: disable
+ line-length: disable
+ truthy: false
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 000000000..6ee80eefd
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,155 @@
+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/[email protected]
+ - 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/[email protected]
+ - 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/[email protected]
+ - 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/[email protected]
+ - 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
+
+ macOS:
+ runs-on: macos-latest
+ timeout-minutes: 10
+ env:
+ MRUBY_CONFIG: ci/gcc-clang
+ CC: clang
+ steps:
+ - uses: actions/[email protected]
+ - 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
+ timeout-minutes: 10
+ env:
+ MRUBY_CONFIG: ci/gcc-clang
+ CC: gcc
+ steps:
+ - uses: actions/[email protected]
+ - 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: 10
+ 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/[email protected]
+ - uses: actions/[email protected]
+ 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
+ timeout-minutes: 10
+ env:
+ MRUBY_CONFIG: ci/msvc
+ steps:
+ - uses: actions/[email protected]
+ - 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"
+ rake -m test:build && rake test:run
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 000000000..4b0be0ed0
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,46 @@
+name: "Code scanning - action"
+
+on:
+ push:
+ pull_request:
+ schedule:
+ - cron: '0 19 * * 4'
+
+jobs:
+ CodeQL-Build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/[email protected]
+ 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
+ # 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
+
+ # â„šī¸ Command-line programs to run using the OS shell.
+ # 📚 https://git.io/JvXDl
+
+ # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ # - run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 000000000..3e89c0328
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,32 @@
+name: Lint
+
+on: [pull_request]
+
+jobs:
+ misspell:
+ name: Check spelling with misspell
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check Out
+ uses: actions/[email protected]
+ - name: Install
+ run: wget -O - -q https://git.io/misspell | sh -s -- -b .
+ - name: Misspell
+ run: git ls-files --empty-directory | xargs ./misspell -error
+ pre-commit:
+ name: Run pre-commit
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/[email protected]
+ - name: Check merge conflict
+ 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@v1
+ with:
+ path: ~/.cache/pre-commit
+ key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
+ - name: Run pre-commit
+ run: pre-commit run --all-files
diff --git a/.github/workflows/oss-fuzz.yml b/.github/workflows/oss-fuzz.yml
new file mode 100644
index 000000000..739e4afad
--- /dev/null
+++ b/.github/workflows/oss-fuzz.yml
@@ -0,0 +1,23 @@
+name: CIFuzz
+on: [pull_request]
+jobs:
+ Fuzzing:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Build Fuzzers
+ uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'mruby'
+ dry-run: false
+ - name: Run Fuzzers
+ uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'mruby'
+ fuzz-seconds: 600
+ dry-run: false
+ - name: Upload Crash
+ uses: actions/[email protected]
+ if: failure()
+ with:
+ name: artifacts
+ path: ./out/artifacts
diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml
new file mode 100644
index 000000000..5637475c7
--- /dev/null
+++ b/.github/workflows/super-linter.yml
@@ -0,0 +1,23 @@
+name: Super Linter
+
+on:
+ push:
+ branches-ignore: [master]
+ # Remove the line above to run when pushing to master
+ pull_request:
+ branches: [master]
+
+jobs:
+ build:
+ name: Lint Code Base
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/[email protected]
+ - uses: github/[email protected]
+ env:
+ ERROR_ON_MISSING_EXEC_BIT: true
+ VALIDATE_BASH: true
+ # VALIDATE_BASH_EXEC: true
+ # VALIDATE_EDITORCONFIG: true
+ # VALIDATE_SHELL_SHFMT: true
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}