Closed CAMOBAP closed 3 years ago
Per we must provide prebuilt for each minor ruby version 2.4
2.5
2.6
2.7
... (now I understand the advantages of ffi
gem)
Also, I unpacked nogokiri gem and it contains prebuilt for each minor ruby version
drwxr-xr-x 3 camobap staff 96B Dec 30 10:51 2.5 drwxr-xr-x 3 camobap staff 96B Dec 30 10:51 2.6 drwxr-xr-x 3 camobap staff 96B Dec 30 10:51 2.7 drwxr-xr-x 3 camobap staff 96B Dec 30 10:51 3.0
I will spend some time to provide it (find some official docs) after this I see the only way is to set up cross-compiling on mac os GHA
Note platform gems temporaly deleted with:
gem yank expressir -v 0.2.6 --platform x86_64-linux
gem yank expressir -v 0.2.6 --platform x64-mingw32
gem yank expressir -v 0.2.6 --platform x86_64-darwin-19
What I have found so far:
If we compare two approaches:
Criteria | rake-compiler-docker | GHA |
---|---|---|
Run locally (on demand) | + | - |
Support from community | + | - |
Compilation time | - | +[1] |
[1] - depends on VM availability
To me, rake-compiler-docker approach looks more promissing
@zakjan could you please help to understand what is the best way to test that expressir
command works as expected? I have tried:
expressir express-to-owl original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.xml
expressir express-to-owl original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.exp
But looks like it produces nothing. What is the best way to do end to end test?
P.S. rspec
isn't an option for me because I need to test that cross-compiled native gem works
Currently the new native parser is exposed only in Ruby code, there is no external command using it yet in Expressir directly.
express-to-owl uses the previous parser accepting xml only as input. The new parser and model are built in a way so that it could be used also for owl transformation, but it hasn't been implemented yet.
For your testing you can create your own Ruby file:
require "expressir/express_exp/parser"
input_file = ARGV.shift
repo = Expressir::ExpressExp::Parser.from_exp(input_file)
schema = repo.schemas.first
puts schema.id
This should output schema name.
Ok, what I did so far:
After release gem install expressir --platform x86_64-darwin
still require to build native extension, I will check tomorrow, maybe it's related to some caching issues on rubygem.org side
Update: but works for linux in docker, I will check windows tomorrow too
Update2: macos works now also
A couple of issues was discovered for platform gems:
https://github.com/metanorma/metanorma-standoc/runs/1623761565?check_suite_focus=true