libkernaux/.cirrus.yml

105 lines
3.1 KiB
YAML
Raw Normal View History

2022-01-31 07:42:28 +00:00
# We use Cirrus CI to test on FreeBSD.
2022-02-09 23:13:03 +00:00
# For GNU/Linux CI see GitHub Actions.
2022-01-31 07:42:28 +00:00
2022-01-31 07:38:24 +00:00
freebsd_instance:
2022-11-26 19:04:36 +00:00
image_family: freebsd-13-1
2022-01-31 07:38:24 +00:00
2022-01-31 14:30:28 +00:00
main_freebsd_task:
2022-01-31 14:12:53 +00:00
name: Main (FreeBSD)
only_if: $CIRRUS_BRANCH == 'master' || $CIRRUS_BASE_BRANCH == 'master'
2022-02-01 01:20:19 +00:00
dependencies_script:
2022-12-13 00:54:27 +00:00
- pkg install --yes autoconf automake cppcheck libtool libyaml py39-pip py39-wheel python3
- pip install --user Jinja2 PyYAML
2022-02-01 01:43:42 +00:00
main_build_script:
2022-01-31 07:42:28 +00:00
- ./autogen.sh
- ./configure --enable-fixtures --enable-checks-all CFLAGS='-O3'
2022-01-31 07:42:28 +00:00
- make
- sudo make install
2022-02-01 01:43:42 +00:00
main_test_script:
- make check
2022-01-31 08:08:06 +00:00
2022-02-01 01:59:36 +00:00
mruby_freebsd_task:
name: mruby (FreeBSD)
only_if: $CIRRUS_BRANCH == 'master' || $CIRRUS_BASE_BRANCH == 'master'
env:
CPATH: '/usr/local/include'
LIBRARY_PATH: '/usr/local/lib'
2022-05-24 15:25:00 +00:00
MRUBY_YAML_USE_SYSTEM_LIBRARY: x
2022-02-01 01:59:36 +00:00
dependencies_script:
- pkg install --yes autoconf automake git libtool rubygem-rake wget
2022-02-01 01:59:36 +00:00
dependencies_mruby_script:
2022-05-28 12:22:50 +00:00
- wget https://github.com/mruby/mruby/archive/3.1.0.zip -O mruby-3.1.0.zip
- unzip mruby-3.1.0.zip
2022-02-01 01:59:36 +00:00
main_build_script:
- ./autogen.sh
- ./configure CFLAGS='-O3'
2022-02-01 01:59:36 +00:00
- make
- sudo make install
mruby_test_script:
2022-05-28 12:22:50 +00:00
- cd mruby-3.1.0
- MRUBY_CONFIG=../bindings/mruby/build_config.rb rake test
2022-02-01 01:59:36 +00:00
2022-01-31 14:30:28 +00:00
ruby_freebsd_task:
2022-01-31 14:12:53 +00:00
name: Ruby (FreeBSD)
only_if: $CIRRUS_BRANCH == 'master' || $CIRRUS_BASE_BRANCH == 'master'
env:
CPATH: '/usr/local/include'
2022-02-09 23:11:02 +00:00
LIBRARY_PATH: '/usr/local/lib'
2022-01-31 09:02:08 +00:00
dependencies_script:
2022-12-18 05:18:55 +00:00
- pkg install --yes autoconf automake cppcheck git libtool wget
2022-02-01 01:43:42 +00:00
dependencies_ruby_script:
2022-02-01 01:28:05 +00:00
- wget https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.3.tar.gz
- tar -xzf ruby-3.0.3.tar.gz
2022-01-31 09:04:03 +00:00
- cd ruby-3.0.3
2022-02-01 01:51:08 +00:00
- ./configure --disable-install-doc
2022-02-01 01:28:05 +00:00
- make
2022-01-31 09:04:03 +00:00
- sudo make install
2022-02-01 01:43:42 +00:00
main_build_script:
2022-01-31 08:08:06 +00:00
- ./autogen.sh
- ./configure CFLAGS='-O3'
2022-01-31 08:08:06 +00:00
- make
- sudo make install
2022-02-01 01:43:42 +00:00
ruby_build_script:
- cd bindings/ruby
2022-02-09 20:03:06 +00:00
- ./bin/setup
2022-01-31 09:02:08 +00:00
- bundle exec rake compile
2022-02-01 01:43:42 +00:00
ruby_test_script:
- cd bindings/ruby
2022-01-31 09:02:08 +00:00
- bundle exec rake
2022-02-01 02:46:34 +00:00
rust_freebsd_task:
name: Rust (FreeBSD)
only_if: $CIRRUS_BRANCH == 'master' || $CIRRUS_BASE_BRANCH == 'master'
env:
RUSTFLAGS: '-L /usr/local/lib'
2022-02-01 02:46:34 +00:00
dependencies_script:
- pkg install --yes autoconf automake libtool
2022-02-01 02:46:34 +00:00
dependencies_rust_script:
2022-02-01 02:56:44 +00:00
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
main_build_script:
- ./autogen.sh
- ./configure CFLAGS='-O3'
- make
- sudo make install
rust_test_script:
- cd bindings/rust
- ~/.cargo/bin/cargo test
- ~/.cargo/bin/cargo clippy
- ~/.cargo/bin/cargo fmt --check
2022-12-20 07:12:30 +00:00
main_freebsd_port_task:
name: Main (FreeBSD port)
only_if: "changesInclude('.cirrus.yml', 'pkgs/freebsd/**')"
dependencies_script:
- pkg install --yes portfmt portlint porttools
port_prepare_script:
- echo 'DEVELOPER=yes' >> /etc/make.conf
- rm -rf /usr/ports/devel/libkernaux/
- cp -r $CIRRUS_WORKING_DIR/pkgs/freebsd/devel/libkernaux /usr/ports/devel/
port_test_script:
- cd /usr/ports/devel/libkernaux/
- portfmt -D Makefile
- portclippy --strict Makefile
- portlint -A
- port test .