Unverified Commit fbe5033f authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #5224 from jbampton/lint-yaml

feat(CI): add a GitHub Action to lint the YAML
parents 8f8e8327 aa6fc8c3
...@@ -8,11 +8,11 @@ jobs: ...@@ -8,11 +8,11 @@ jobs:
env: env:
MRUBY_CONFIG: ci/gcc-clang MRUBY_CONFIG: ci/gcc-clang
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: apt - name: apt
run: sudo apt install ruby gperf run: sudo apt install ruby gperf
- name: build and test - name: build and test
run: rake -m -j4 gensym all test run: rake -m -j4 gensym all test
Ubuntu-1804-gcc: Ubuntu-1804-gcc:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
...@@ -21,11 +21,11 @@ jobs: ...@@ -21,11 +21,11 @@ jobs:
CC: gcc CC: gcc
CXX: g++ CXX: g++
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: apt - name: apt
run: sudo apt install ruby gperf gcc g++ run: sudo apt install ruby gperf gcc g++
- name: build and test - name: build and test
run: rake -m -j4 gensym all test run: rake -m -j4 gensym all test
Ubuntu-1804-clang: Ubuntu-1804-clang:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
...@@ -34,22 +34,22 @@ jobs: ...@@ -34,22 +34,22 @@ jobs:
CC: clang CC: clang
CXX: clang++ CXX: clang++
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: apt - name: apt
run: sudo apt install ruby gperf run: sudo apt install ruby gperf
- name: build and test - name: build and test
run: rake -m -j4 gensym all test run: rake -m -j4 gensym all test
macOS: macOS:
runs-on: macos-latest runs-on: macos-latest
env: env:
MRUBY_CONFIG: ci/gcc-clang MRUBY_CONFIG: ci/gcc-clang
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: brew - name: brew
run: brew install ruby gperf run: brew install ruby gperf
- name: build and test - name: build and test
run: rake -m -j4 gensym all test run: rake -m -j4 gensym all test
Windows-MinGW: Windows-MinGW:
runs-on: windows-latest runs-on: windows-latest
...@@ -57,11 +57,11 @@ jobs: ...@@ -57,11 +57,11 @@ jobs:
MRUBY_CONFIG: ci/gcc-clang MRUBY_CONFIG: ci/gcc-clang
CFLAGS: -g -O1 -Wall -Wundef CFLAGS: -g -O1 -Wall -Wundef
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: chocolatey - name: chocolatey
run: choco install -y ruby gperf run: choco install -y ruby gperf
- name: build - name: build
run: rake -E 'STDOUT.sync=true' -j4 gensym all test run: rake -E 'STDOUT.sync=true' -j4 gensym all test
Windows-Cygwin: Windows-Cygwin:
runs-on: windows-latest runs-on: windows-latest
...@@ -69,25 +69,25 @@ jobs: ...@@ -69,25 +69,25 @@ jobs:
MRUBY_CONFIG: ci/gcc-clang MRUBY_CONFIG: ci/gcc-clang
ACTIONS_ALLOW_UNSECURE_COMMANDS: true ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: actions/cache@v1 - uses: actions/cache@v1
with: with:
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
key: ${{ runner.os }}-cygwin-chocolatey-${{ matrix.os }}-${{ github.sha }} key: ${{ runner.os }}-cygwin-chocolatey-${{ matrix.os }}-${{ github.sha }}
restore-keys: | restore-keys: |
${{ runner.os }}-cygwin-chocolatey-${{ matrix.os }}- ${{ runner.os }}-cygwin-chocolatey-${{ matrix.os }}-
${{ runner.os }}-cygwin-chocolatey- ${{ runner.os }}-cygwin-chocolatey-
- name: chocolatey - name: chocolatey
run: choco install -y cygwin run: choco install -y cygwin
- name: Install cygwin packages - name: Install cygwin packages
shell: cmd 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 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 - name: Set ENV
run: | run: |
echo '::set-env name=PATH::C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin' echo '::set-env name=PATH::C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin'
- name: build and test - name: build and test
shell: cmd shell: cmd
run: C:\tools\cygwin\bin\ruby.exe /usr/bin/rake -E 'STDOUT.sync=true' -m gensym all test run: C:\tools\cygwin\bin\ruby.exe /usr/bin/rake -E 'STDOUT.sync=true' -m gensym all test
Windows-VC: Windows-VC:
runs-on: windows-latest runs-on: windows-latest
...@@ -97,11 +97,11 @@ jobs: ...@@ -97,11 +97,11 @@ jobs:
CFLAGS: "/c /nologo /W3 /we4013 /Zi /MD /D_CRT_SECURE_NO_WARNINGS" CFLAGS: "/c /nologo /W3 /we4013 /Zi /MD /D_CRT_SECURE_NO_WARNINGS"
CXXFLAGS: "/c /nologo /W3 /Zi /MD /EHs /D_CRT_SECURE_NO_WARNINGS" CXXFLAGS: "/c /nologo /W3 /Zi /MD /EHs /D_CRT_SECURE_NO_WARNINGS"
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: chocolatey - name: chocolatey
run: choco install -y ruby gperf run: choco install -y ruby gperf
- name: build and test - name: build and test
shell: cmd shell: cmd
run: | run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
rake -E "STDOUT.sync=true" gensym all test rake -E "STDOUT.sync=true" gensym all test
...@@ -12,40 +12,40 @@ jobs: ...@@ -12,40 +12,40 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
# We must fetch at least the immediate parents so that if this is # We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head. # a pull request then we can checkout the head.
fetch-depth: 2 fetch-depth: 2
# If this run was triggered by a pull request event, then checkout # If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit. # the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2 - run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }} if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages # Override language selection by uncommenting this and choosing your languages
# with: # with:
# languages: go, javascript, csharp, python, cpp, java # languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or 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) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v1 uses: github/codeql-action/autobuild@v1
# ℹ️ Command-line programs to run using the OS shell. # ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines # ✏️ 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 # and modify them (or add more) to build your code if your project
# uses a compiled language # uses a compiled language
#- run: | # - run: |
# make bootstrap # make bootstrap
# make release # make release
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v1
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
...@@ -4,21 +4,20 @@ jobs: ...@@ -4,21 +4,20 @@ jobs:
Fuzzing: Fuzzing:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Build Fuzzers - name: Build Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with: with:
oss-fuzz-project-name: 'mruby' oss-fuzz-project-name: 'mruby'
dry-run: false dry-run: false
- name: Run Fuzzers - name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with: with:
oss-fuzz-project-name: 'mruby' oss-fuzz-project-name: 'mruby'
fuzz-seconds: 600 fuzz-seconds: 600
dry-run: false dry-run: false
- name: Upload Crash - name: Upload Crash
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
if: failure() if: failure()
with: with:
name: artifacts name: artifacts
path: ./out/artifacts path: ./out/artifacts
--- ---
stages: stages:
- pretest - pretest
- test - test
pretest: pretest:
stage: pretest stage: pretest
image: registry.gitlab.com/dabroz/mruby:gcc47_0.1 image: registry.gitlab.com/dabroz/mruby:gcc47_0.1
tags: tags:
- linux - linux
variables: variables:
CC: gcc-4.7 CC: gcc-4.7
CXX: g++-4.7 CXX: g++-4.7
......
---
extends: default
rules:
document-start: disable
line-length: disable
truthy: false
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment