Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/rake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Based on the Cimas-generated workflow; maintained here for native Lasem CI hooks.
# See https://github.com/metanorma/cimas
name: rake

on:
push:
branches: [ main ]
tags: [ v* ]
pull_request:

permissions:
contents: write

jobs:
rake:
uses: metanorma/ci/.github/workflows/generic-rake.yml@main
with:
submodules: recursive
before-setup-ruby: |
case "$RUNNER_OS" in
Linux)
sudo apt-get update
sudo apt-get install -y build-essential pkg-config meson \
ninja-build bison flex gettext libglib2.0-dev \
libgdk-pixbuf-2.0-dev libcairo2-dev libpango1.0-dev \
libxml2-dev fonts-lyx
;;
macOS)
brew install bison cairo flex gdk-pixbuf gettext glib libxml2 \
meson ninja pango pkg-config
{
echo "$(brew --prefix bison)/bin"
echo "$(brew --prefix flex)/bin"
echo "$(brew --prefix gettext)/bin"
} >> "$GITHUB_PATH"
gettext_pkg_config="$(brew --prefix gettext)/lib/pkgconfig"
libxml_pkg_config="$(brew --prefix libxml2)/lib/pkgconfig"
pkg_config_path="$gettext_pkg_config:$libxml_pkg_config:${PKG_CONFIG_PATH:-}"
echo "PKG_CONFIG_PATH=$pkg_config_path" >> "$GITHUB_ENV"
;;
Windows)
true
;;
esac
after-setup-ruby: |
case "$RUNNER_OS" in
Windows)
export PATH="${MINGW_PREFIX:-/ucrt64}/bin:$PATH"
cygpath -w "${MINGW_PREFIX:-/ucrt64}/bin" >> "$GITHUB_PATH"

package_prefix="${MINGW_PACKAGE_PREFIX:-mingw-w64-ucrt-x86_64}"
pacman --noconfirm -S --needed \
"${package_prefix}-lasem" \
"${package_prefix}-pkgconf"
bundle exec rake clean compile
;;
*)
bundle exec rake lasem:build
bundle exec rake clean compile
;;
esac
ruby -Ilib -rlasem -e 'abort "Lasem native extension unavailable" unless Lasem.native_available?'
secrets:
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Auto-generated by Cimas: Do not edit it manually!
# See https://github.com/metanorma/cimas
name: release

on:
workflow_dispatch:
inputs:
next_version:
description: |
Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
required: true
default: 'skip'
repository_dispatch:
types: [ do-release ]

jobs:
release:
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
with:
next_version: ${{ github.event.inputs.next_version }}
secrets:
rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/_yardoc/
/coverage/
/doc/
/lasem-*.gem
/lasem-ruby-*.gem
/pkg/
/tmp/
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vendor/lasem/source"]
path = vendor/lasem/source
url = https://github.com/LasemProject/lasem.git
17 changes: 4 additions & 13 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
# Auto-generated by Cimas: Do not edit it manually!
# See https://github.com/metanorma/cimas
inherit_from:
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
- .rubocop_todo.yml

plugins:
- rubocop-performance
- rubocop-rake
- rubocop-rspec
- https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml

AllCops:
TargetRubyVersion: 3.2
NewCops: enable
Exclude:
- 'coverage/**/*'
- 'tmp/**/*'
- 'vendor/**/*'
TargetRubyVersion: 3.3
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
source "https://rubygems.org"

# Specify the gem's dependencies in lasem-ruby.gemspec.
# Specify the gem's dependencies in lasem.gemspec.
gemspec

gem "irb"
gem "rake", "~> 13.0"
gem "rake-compiler", "~> 1.2"
gem "rspec", "~> 3.0"
gem "rubocop-performance"
gem "rubocop-rake"
Expand Down
Loading
Loading