summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-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
5 files changed, 279 insertions, 0 deletions
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 }}