Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 36 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN \
libgmp-dev \
libnewlib-dev\
libyaml-dev \
minisat \
nodejs \
npm \
parallel \
Expand All @@ -36,7 +37,41 @@ RUN \
python3.12-venv \
ruby \
ruby-dev \
shellcheck
shellcheck \
zlib1g-dev

# build/install eqntott
RUN <<CMDS
git clone --depth=1 https://github.com/TheProjecter/eqntott.git
cd eqntott
./configure
make && make install
cd ..
rm -rf eqntott
CMDS

# build/install espresso
RUN <<CMDS
git clone --depth=1 https://github.com/psksvp/espresso-ab-1.0.git
cd espresso-ab-1.0
./configure
make && make install
cd ..
rm -rf espresso-ab-1.0
CMDS

# build / install must
RUN <<CMDS
git clone https://github.com/jar-ben/mustool.git
cd mustool
git checkout 17fa9f9542a9ce05328dfccd1cd410f05f741ab3
# mcsmus/mcsmus/control.cc is missing #include <cstdio>
sed -i -e 's/#include <signal.h>/#include <signal.h>\n#include <cstdio>/' mcsmus/mcsmus/control.cc
make
install must -m 0777 /usr/bin/must
cd ..
rm -rf mustool
CMDS

RUN apt-get clean autoclean
RUN apt-get autoremove -y
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ on:
workflow_dispatch:
jobs:
publish-singularity-container:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
strategy:
matrix:
runner: [ubuntu-24.04, ubuntu-24.04-arm]
runs-on: ${{ matrix.runner }}
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/regress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,97 @@ jobs:
disable_search: true
files: tools/ruby-gems/idlc/coverage/coverage.xml
flags: idlc
regress-find-configs:
runs-on: ubuntu-latest

outputs:
configs: ${{ steps.configs.outputs.configs }}

steps:
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
- name: Find configuration files
id: configs
run: |
ruby -e "puts 'configs=[\"' + Dir.glob('cfgs/*.yaml').map { |f| File.basename(f, '.yaml') }.join('\", \"') + '\"]'" >> "$GITHUB_OUTPUT"
regress-udb-validate-configs:
runs-on: ubuntu-latest

needs: regress-find-configs
strategy:
matrix:
config: ${{ fromJSON(needs.regress-find-configs.outputs.configs) }}

steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Run udb gem test_${{ matrix.config }} unit test
run: ./bin/ruby tools/ruby-gems/udb/test/test_cfg.rb -n test_cfg_${{ matrix.config }}_valid
- name: Rename coverage file
run: mv tools/ruby-gems/udb/coverage/.resultset.json tools/ruby-gems/udb/coverage/${{ matrix.config }}.resultset.json
- name: Save coverage report
uses: actions/upload-artifact@v4
with:
name: udb-test-cfg-${{ matrix.config }}-cov
path: tools/ruby-gems/udb/coverage/${{ matrix.config }}.resultset.json
regress-udb-unit-test:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
strategy:
matrix:
test:
- logic
- conditions
- cli
- yaml_loader
- cfg_arch
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: Run udb gem ${{ matrix.test }} unit tests
run: ./bin/ruby tools/ruby-gems/udb/test/test_${{ matrix.test }}.rb
- name: Rename coverage file
run: mv tools/ruby-gems/udb/coverage/.resultset.json tools/ruby-gems/udb/coverage/${{ matrix.test }}.resultset.json
- name: Save coverage report
uses: actions/upload-artifact@v4
with:
name: udb-${{ matrix.test }}-cov
path: tools/ruby-gems/udb/coverage/${{ matrix.test }}.resultset.json
regress-udb-cov-report:
runs-on: ubuntu-latest
env:
SINGULARITY: 1
needs:
- regress-udb-unit-test
- regress-udb-validate-configs
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: singularity setup
uses: ./.github/actions/singularity-setup
- name: download coverage
uses: actions/download-artifact@v5
with:
pattern: udb-*-cov
path: _cov/udb
merge-multiple: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Collate coverage
run: ./do chore:udb:collate_cov[_cov/udb]
- name: Upload udb coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
files: tools/ruby-gems/udb/coverage/coverage.xml
flags: udb
regress-gen-isa-manual:
runs-on: ubuntu-latest
env:
Expand Down
93 changes: 89 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"solargraph.bundlerPath": "bin/bundle",
"solargraph.bundlerPath": "./bin/bundle",
"solargraph.useBundler": true,
"sorbet.lspConfigs": [


{
"id": "container",
"name": "Sorbet (UDB)",
Expand Down Expand Up @@ -34,13 +35,13 @@
"name": "Sorbet (Host)",
"description": "Sorbet on the host",
"command": [
"/usr2/dhower/.rbenv/shims/bundle",
"bundle",
"exec",
"srb",
"typecheck",
"--lsp",
"--dir",
"tools/gems",
"tools/ruby-gems",
"--ignore",
"api_doc",
"--ignore",
Expand All @@ -66,5 +67,89 @@
]
}
],
"sorbet.selectedLspConfigId": "host"
"sorbet.selectedLspConfigId": "host",
"rubyTestExplorer.debugCommand": "bundle exec rdebug-ide",
"rubyTestExplorer.minitestCommand": "bundle exec rake",
"rubyTestExplorer.rspecCommand": "bundle exec rspec",
"rubyTestExplorer.testFramework": "minitest",
"rubyTestExplorer.minitestDirectory": "./tools/ruby-gems/idlc/test/",
"ipynb.experimental.serialization": false,
"files.associations": {
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"regex": "cpp",
"source_location": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"ranges": "cpp",
"semaphore": "cpp",
"span": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"variant": "cpp"
}
}
6 changes: 1 addition & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ ruby "~> 3.2"
# local gems in UDB
gem "idlc", path: "tools/ruby-gems/idlc"
gem "idl_highlighter", path: "tools/ruby-gems/idl_highlighter"
gem "udb_helpers", path: "tools/ruby-gems/udb_helpers"
gem "udb", path: "tools/ruby-gems/udb"
gem "udb_helpers", path: "tools/ruby-gems/udb_helpers"

source "https://rubygems.org"

Expand All @@ -18,12 +18,8 @@ gem "bigdecimal"
gem "concurrent-ruby", require: "concurrent"
gem "concurrent-ruby-ext"
gem "json_schemer", "~> 1.0"
# gem "pygments.rb"
gem "rake", "~> 13.0"
#gem "rouge"
gem "ruby-progressbar", "~> 1.13"
gem "sorbet-runtime"
#gem "treetop", "1.6.12"
gem "ttfunk", "1.7" # needed to avoid having asciidoctor-pdf dependencies pulling in a buggy version of ttunk (1.8)
gem "webrick"
gem "write_xlsx"
Expand Down
Loading
Loading