diff options
| author | John Bampton <[email protected]> | 2020-12-15 22:46:26 +1000 |
|---|---|---|
| committer | John Bampton <[email protected]> | 2020-12-15 23:39:36 +1000 |
| commit | aa6fc8c38e5b3ab5dd30c08ee6e88a0936b465b1 (patch) | |
| tree | 7a9bddb0301235a8adf98516247885ef6b50e148 /.github | |
| parent | c1c8c25e70a54e6a82ab8cea05c115b94eb3d5ab (diff) | |
| download | mruby-aa6fc8c38e5b3ab5dd30c08ee6e88a0936b465b1.tar.gz mruby-aa6fc8c38e5b3ab5dd30c08ee6e88a0936b465b1.zip | |
feat(CI): add a GitHub Action to lint the YAML
- Run only on pull request
- Add a `.yamllint` config file
- Lint YAML
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build.yml | 104 | ||||
| -rw-r--r-- | .github/workflows/codeql-analysis.yml | 74 | ||||
| -rw-r--r-- | .github/workflows/lint.yml | 12 | ||||
| -rw-r--r-- | .github/workflows/main.yml | 35 |
4 files changed, 118 insertions, 107 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 811a11cf5..bbb6c1d29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,11 +8,11 @@ jobs: env: MRUBY_CONFIG: travis 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@v1 + - name: apt + run: sudo apt install ruby gperf + - name: build and test + run: rake -m -j4 gensym all test Ubuntu-1804-gcc: runs-on: ubuntu-18.04 @@ -21,11 +21,11 @@ jobs: 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@v1 + - name: apt + run: sudo apt install ruby gperf gcc g++ + - name: build and test + run: rake -m -j4 gensym all test Ubuntu-1804-clang: runs-on: ubuntu-18.04 @@ -34,22 +34,22 @@ jobs: 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@v1 + - name: apt + run: sudo apt install ruby gperf + - name: build and test + run: rake -m -j4 gensym all test macOS: runs-on: macos-latest env: MRUBY_CONFIG: travis 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@v1 + - name: brew + run: brew install ruby gperf + - name: build and test + run: rake -m -j4 gensym all test Windows-MinGW: runs-on: windows-latest @@ -57,11 +57,11 @@ jobs: MRUBY_CONFIG: travis CFLAGS: -g -O1 -Wall -Wundef 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@v1 + - name: chocolatey + run: choco install -y ruby gperf + - name: build + run: rake -E 'STDOUT.sync=true' -j4 gensym all test Windows-Cygwin: runs-on: windows-latest @@ -69,25 +69,25 @@ jobs: MRUBY_CONFIG: travis ACTIONS_ALLOW_UNSECURE_COMMANDS: true 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@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 Windows-VC: runs-on: windows-latest @@ -97,11 +97,11 @@ jobs: CFLAGS: "/c /nologo /W3 /we4013 /Zi /MD /D_CRT_SECURE_NO_WARNINGS" CXXFLAGS: "/c /nologo /W3 /Zi /MD /EHs /D_CRT_SECURE_NO_WARNINGS" 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@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 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index efbc25e93..ea9f9bd8e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,40 +12,40 @@ jobs: 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..e04d0fc75 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,12 @@ +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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3c1a7e07e..60414e7dc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,21 +4,20 @@ 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 - + - 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 |
