summaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml176
-rw-r--r--.github/workflows/codeql-analysis.yml78
-rw-r--r--.github/workflows/lint.yml23
-rw-r--r--.github/workflows/main.yml24
-rw-r--r--.github/workflows/oss-fuzz.yml27
-rw-r--r--.github/workflows/spell-checker.yml17
6 files changed, 219 insertions, 126 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 811a11cf5..60aa438a2 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -3,105 +3,151 @@ name: Build & Test
on: [push, pull_request]
jobs:
+ Check-Skip:
+ if: |
+ !contains(github.event.head_commit.message, '[ci skip]') &&
+ !contains(github.event.head_commit.message, '[skip ci]') &&
+ !contains(github.event.head_commit.message, '[skip gha]')
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo not skip
+
Ubuntu-1604:
+ needs: Check-Skip
runs-on: ubuntu-16.04
env:
- MRUBY_CONFIG: travis
+ MRUBY_CONFIG: ci/gcc-clang
+ CC: gcc
steps:
- - uses: actions/checkout@v1
- - name: apt
- run: sudo apt install ruby gperf
- - name: build and test
- run: rake -m -j4 gensym all test
+ - uses: actions/checkout@v2
+ - name: Ruby version
+ run: ruby -v
+ - name: Compiler version
+ run: ${{ env.CC }} --version
+ - name: Build and test
+ run: rake -m && rake test
Ubuntu-1804-gcc:
+ needs: Check-Skip
runs-on: ubuntu-18.04
env:
- MRUBY_CONFIG: travis
+ MRUBY_CONFIG: ci/gcc-clang
CC: gcc
- CXX: g++
steps:
- - uses: actions/checkout@v1
- - name: apt
- run: sudo apt install ruby gperf gcc g++
- - name: build and test
- run: rake -m -j4 gensym all test
+ - uses: actions/checkout@v2
+ - name: Ruby version
+ run: ruby -v
+ - name: Compiler version
+ run: ${{ env.CC }} --version
+ - name: Build and test
+ run: rake -m && rake test
Ubuntu-1804-clang:
+ needs: Check-Skip
runs-on: ubuntu-18.04
env:
- MRUBY_CONFIG: travis
+ MRUBY_CONFIG: ci/gcc-clang
CC: clang
- CXX: clang++
steps:
- - uses: actions/checkout@v1
- - name: apt
- run: sudo apt install ruby gperf
- - name: build and test
- run: rake -m -j4 gensym all test
+ - uses: actions/checkout@v2
+ - name: Ruby version
+ run: ruby -v
+ - name: Compiler version
+ run: ${{ env.CC }} --version
+ - name: Build and test
+ run: rake -m && rake test
macOS:
+ needs: Check-Skip
runs-on: macos-latest
env:
- MRUBY_CONFIG: travis
+ MRUBY_CONFIG: ci/gcc-clang
+ CC: clang
steps:
- - uses: actions/checkout@v1
- - name: brew
- run: brew install ruby gperf
- - name: build and test
- run: rake -m -j4 gensym all test
+ - uses: actions/checkout@v2
+ - name: Ruby version
+ run: ruby -v
+ - name: Compiler version
+ run: ${{ env.CC }} --version
+ - name: Build and test
+ run: rake -m && rake test
Windows-MinGW:
+ needs: Check-Skip
runs-on: windows-latest
env:
- MRUBY_CONFIG: travis
- CFLAGS: -g -O1 -Wall -Wundef
+ MRUBY_CONFIG: ci/gcc-clang
+ CC: gcc
steps:
- - uses: actions/checkout@v1
- - name: chocolatey
- run: choco install -y ruby gperf
- - name: build
- run: rake -E 'STDOUT.sync=true' -j4 gensym all test
+ - uses: actions/checkout@v2
+ - name: Ruby version
+ run: ruby -v
+ - name: Compiler version
+ run: ${{ env.CC }} --version
+ - name: Build and test
+ # If build and test are separated like `rake && rake test`, somehow
+ # it will be fully built even at `rake test`, so it is not separated.
+ run: rake -E STDOUT.sync=true test
Windows-Cygwin:
+ needs: Check-Skip
runs-on: windows-latest
env:
- MRUBY_CONFIG: travis
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@v1
- - uses: actions/cache@v1
- with:
- path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
- key: ${{ runner.os }}-cygwin-chocolatey-${{ matrix.os }}-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-cygwin-chocolatey-${{ matrix.os }}-
- ${{ runner.os }}-cygwin-chocolatey-
- - name: chocolatey
- run: choco install -y cygwin
- - name: Install cygwin packages
- shell: cmd
- run: C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -l C:/tools/cygwin/package -s http://mirrors.kernel.org/sourceware/cygwin/ -P gcc-core,gcc-g++,make,gperf,ruby
- - name: Set ENV
- run: |
- echo '::set-env name=PATH::C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin'
- - name: build and test
- shell: cmd
- run: C:\tools\cygwin\bin\ruby.exe /usr/bin/rake -E 'STDOUT.sync=true' -m gensym all test
+ - uses: actions/checkout@v2
+ - uses: actions/cache@v2
+ 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 -E STDOUT.sync=true -m
+ ruby /usr/bin/rake -E STDOUT.sync=true test
+ - 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:
+ needs: Check-Skip
runs-on: windows-latest
env:
- MRUBY_CONFIG: appveyor
- # TODO(take-cheeze): Re-enable /O2
- CFLAGS: "/c /nologo /W3 /we4013 /Zi /MD /D_CRT_SECURE_NO_WARNINGS"
- CXXFLAGS: "/c /nologo /W3 /Zi /MD /EHs /D_CRT_SECURE_NO_WARNINGS"
+ MRUBY_CONFIG: ci/msvc
steps:
- - uses: actions/checkout@v1
- - name: chocolatey
- run: choco install -y ruby gperf
- - name: build and test
- shell: cmd
- run: |
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
- rake -E "STDOUT.sync=true" gensym all test
+ - uses: actions/checkout@v2
+ - 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 -E STDOUT.sync=true -m && rake -E STDOUT.sync=true test
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 0e7a5591f..19fb63b35 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -8,44 +8,48 @@ on:
jobs:
CodeQL-Build:
+ if: |
+ !contains(github.event.head_commit.message, '[ci skip]') &&
+ !contains(github.event.head_commit.message, '[skip ci]') &&
+ !contains(github.event.head_commit.message, '[skip gha]')
runs-on: ubuntu-latest
steps:
- - name: Checkout repository
- uses: actions/checkout@v2
- 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
-
- # If this run was triggered by a pull request event, then checkout
- # the head of the pull request instead of the merge commit.
- - run: git checkout HEAD^2
- if: ${{ github.event_name == 'pull_request' }}
-
- # 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
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ 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
+
+ # If this run was triggered by a pull request event, then checkout
+ # the head of the pull request instead of the merge commit.
+ - run: git checkout HEAD^2
+ if: ${{ github.event_name == 'pull_request' }}
+
+ # 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..ed1682b05
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,23 @@
+name: โ„๏ธ Lint
+
+on: [pull_request]
+
+jobs:
+ yamllint:
+ name: ๐Ÿถ YAML
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: ๐Ÿงน YAML Lint
+ uses: ibiqlik/action-yamllint@v3
+ markdownlint:
+ name: ๐Ÿธ Markdown
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: ๐Ÿš€ Use Node.js
+ uses: actions/[email protected]
+ with:
+ node-version: '12.x'
+ - run: npm install -g [email protected]
+ - run: markdownlint '**/*.md'
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index 3c1a7e07e..000000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-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/upload-artifact@v1
- if: failure()
- with:
- name: artifacts
- path: ./out/artifacts
-
diff --git a/.github/workflows/oss-fuzz.yml b/.github/workflows/oss-fuzz.yml
new file mode 100644
index 000000000..8f2b24f17
--- /dev/null
+++ b/.github/workflows/oss-fuzz.yml
@@ -0,0 +1,27 @@
+name: CIFuzz
+on: [pull_request]
+jobs:
+ Fuzzing:
+ if: |
+ !contains(github.event.head_commit.message, '[ci skip]') &&
+ !contains(github.event.head_commit.message, '[skip ci]') &&
+ !contains(github.event.head_commit.message, '[skip gha]')
+ 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/upload-artifact@v1
+ if: failure()
+ with:
+ name: artifacts
+ path: ./out/artifacts
diff --git a/.github/workflows/spell-checker.yml b/.github/workflows/spell-checker.yml
new file mode 100644
index 000000000..7e86e0198
--- /dev/null
+++ b/.github/workflows/spell-checker.yml
@@ -0,0 +1,17 @@
+name: ๐Ÿ’Ž Spellchecker
+
+on: [pull_request]
+
+jobs:
+ misspell:
+ name: ๐Ÿงน Check Spelling
+ runs-on: ubuntu-latest
+ steps:
+ - name: ๐Ÿ’ Check Out
+ uses: actions/checkout@v2
+ - name: ๐Ÿ… Install
+ run: |
+ wget -O - -q https://git.io/misspell | sh -s -- -b .
+ - name: ๐ŸŒถ๏ธ Misspell
+ run: |
+ git ls-files --empty-directory | xargs ./misspell -error