2021-12-13 22:24:25 +00:00
|
|
|
name: Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-12-13 22:33:53 +00:00
|
|
|
branches: [master]
|
2021-12-13 22:24:25 +00:00
|
|
|
pull_request:
|
2021-12-13 22:33:53 +00:00
|
|
|
branches: [master]
|
2021-12-13 22:24:25 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-12-14 22:20:48 +00:00
|
|
|
test:
|
2021-12-14 19:35:34 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-12-14 22:20:48 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-01-17 14:24:51 +00:00
|
|
|
# TODO: something is wrong with TCC, Multiboot 2 info tag struct size
|
|
|
|
#cc: ['gcc', 'clang', 'tcc']
|
|
|
|
cc: ['gcc', 'clang']
|
2021-12-14 22:20:48 +00:00
|
|
|
opt: ['', '-O0', '-O3']
|
2021-12-14 19:35:34 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-01-18 17:31:34 +00:00
|
|
|
- uses: ruby/setup-ruby@v1
|
2022-01-18 17:34:51 +00:00
|
|
|
with:
|
|
|
|
ruby-version: 3.0
|
2022-01-18 17:41:28 +00:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
2022-01-18 17:31:34 +00:00
|
|
|
|
2021-12-14 23:03:51 +00:00
|
|
|
- name: dependencies
|
2022-01-17 14:28:40 +00:00
|
|
|
run: sudo apt-get -y install clang tcc
|
2021-12-14 19:35:34 +00:00
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
2021-12-14 19:36:53 +00:00
|
|
|
- name: configure
|
2022-01-22 20:36:05 +00:00
|
|
|
run: ./configure --enable-tests CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}} -fPIC'
|
2021-12-14 22:10:28 +00:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: check
|
2022-01-17 12:43:33 +00:00
|
|
|
run: make check || (cat test-suite.log && false)
|
2021-12-17 20:26:29 +00:00
|
|
|
- name: install
|
|
|
|
run: sudo make install
|
|
|
|
|
|
|
|
cppcheck:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: dependencies
|
2022-01-17 14:28:40 +00:00
|
|
|
run: sudo apt-get -y install cppcheck
|
2021-12-17 20:17:14 +00:00
|
|
|
- name: cppcheck source code
|
2022-01-19 22:55:11 +00:00
|
|
|
# TODO: don't suppress "src/printf.c"
|
|
|
|
run: cppcheck --quiet --error-exitcode=1 --std=c99 --enable=warning,style,performance,portability --suppress='*:src/printf.c' include/ src/
|
2021-12-17 20:17:14 +00:00
|
|
|
- name: cppcheck examples
|
|
|
|
run: cppcheck --quiet --error-exitcode=1 --std=c99 --enable=warning,style,performance,portability --suppress=duplicateExpression --suppress=staticStringCompare examples/
|
|
|
|
- name: cppcheck tests
|
|
|
|
run: cppcheck --quiet --error-exitcode=1 --std=c99 --enable=warning,style,performance,portability --suppress=unusedStructMember tests/
|
2022-01-30 03:20:14 +00:00
|
|
|
|
|
|
|
mruby:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-01-30 05:51:55 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
2022-01-30 03:20:14 +00:00
|
|
|
- name: dependencies
|
2022-01-30 05:51:55 +00:00
|
|
|
run: sudo apt-get -y install cppcheck rake
|
2022-01-30 05:54:53 +00:00
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
|
|
|
run: ./configure CFLAGS='-O3 -fPIC'
|
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: install
|
|
|
|
run: sudo make install
|
2022-01-30 05:51:55 +00:00
|
|
|
- working-directory: vendor/mruby
|
|
|
|
name: build config
|
2022-01-30 05:53:07 +00:00
|
|
|
run: cp ../../pkgs/mruby/build_config.rb build_config/default.rb
|
2022-01-30 05:51:55 +00:00
|
|
|
- working-directory: vendor/mruby
|
|
|
|
name: test
|
|
|
|
run: rake test
|
2022-01-30 03:20:14 +00:00
|
|
|
- working-directory: pkgs/mruby
|
|
|
|
name: cppcheck
|
|
|
|
run: cppcheck --quiet --error-exitcode=1 --std=c99 --enable=warning,style,performance,portability .
|
2022-01-30 03:09:48 +00:00
|
|
|
|
|
|
|
ruby:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
ruby-version: 3.0
|
2022-01-30 03:20:14 +00:00
|
|
|
- name: dependencies
|
|
|
|
run: sudo apt-get -y install cppcheck
|
2022-01-30 03:09:48 +00:00
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
|
|
|
run: ./configure CFLAGS='-O3 -fPIC'
|
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: install
|
|
|
|
run: sudo make install
|
|
|
|
- working-directory: pkgs/ruby
|
|
|
|
name: bundle
|
|
|
|
run: bundle install
|
|
|
|
- working-directory: pkgs/ruby
|
|
|
|
name: compile
|
|
|
|
run: rake compile
|
|
|
|
- working-directory: pkgs/ruby
|
|
|
|
name: test & lint
|
|
|
|
run: rake
|
2022-01-30 03:20:14 +00:00
|
|
|
- working-directory: pkgs/ruby
|
|
|
|
name: cppcheck
|
|
|
|
run: cppcheck --quiet --error-exitcode=1 --std=c99 --enable=warning,style,performance,portability .
|
2022-01-30 03:10:57 +00:00
|
|
|
|
|
|
|
rust:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
2022-01-30 03:15:53 +00:00
|
|
|
components: rustfmt, clippy
|
2022-01-30 03:10:57 +00:00
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
|
|
|
run: ./configure CFLAGS='-O3 -fPIC'
|
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: install
|
|
|
|
run: sudo make install
|
|
|
|
- working-directory: pkgs/rust
|
|
|
|
name: test
|
|
|
|
run: cargo test
|
2022-01-30 03:15:53 +00:00
|
|
|
- working-directory: pkgs/rust
|
|
|
|
name: fmt
|
|
|
|
run: cargo fmt --check
|
|
|
|
- working-directory: pkgs/rust
|
|
|
|
name: clippy
|
|
|
|
run: cargo clippy
|