Skip to content

Commit 9f8d8cc

Browse files
committed
Merge remote-tracking branch 'origin/main' into param_dep
2 parents 044a455 + cbee0b7 commit 9f8d8cc

File tree

42 files changed

+829
-6483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+829
-6483
lines changed

.devcontainer/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,19 @@ RUN apt-get clean autoclean
7777
RUN apt-get autoremove -y
7878
RUN rm -rf /var/lib/{apt,dpkg,cache,log}/*
7979

80+
# Create Python virtual environment and install packages
81+
COPY requirements.txt /tmp/requirements.txt
82+
RUN /usr/bin/python3 -m venv /opt/venv && \
83+
/opt/venv/bin/pip install -r /tmp/requirements.txt && \
84+
rm /tmp/requirements.txt
85+
ENV PATH="/opt/venv/bin:$PATH"
86+
87+
# Install npm packages globally in the container
88+
COPY package.json package-lock.json /opt/node/
89+
RUN cd /opt/node && \
90+
/usr/bin/npm ci && \
91+
rm /opt/node/package.json /opt/node/package-lock.json
92+
ENV NODE_PATH="/opt/node/node_modules"
93+
ENV PATH="/opt/node/node_modules/.bin:$PATH"
94+
8095
WORKDIR /workspace

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "RISC-V UnifiedDB Dev",
3-
"build": { "dockerfile": "Dockerfile" },
3+
"build": { "dockerfile": "Dockerfile", "context": ".." },
44
"updateContentCommand": "${containerWorkspaceFolder}/.devcontainer/updateContentCommand.sh",
55
"onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/onCreateCommand.sh",
66
"remoteEnv": {

.devcontainer/onCreateCommand.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#!/bin/bash
22

3-
npm i
43
bundle install

.github/workflows/container.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ on:
66
workflow_dispatch:
77
jobs:
88
publish-singularity-container:
9-
runs-on: ubuntu-latest
109
env:
1110
SINGULARITY: 1
11+
strategy:
12+
matrix:
13+
runner: [ubuntu-24.04, ubuntu-24.04-arm]
14+
runs-on: ${{ matrix.runner }}
1215
steps:
1316
- name: Clone Github Repo Action
1417
uses: actions/checkout@v4

Gemfile.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ DEPENDENCIES
351351
rubocop-performance
352352
rubocop-sorbet
353353
ruby-prof
354-
ruby-progressbar (~> 1.13)
355354
simplecov
356355
simplecov-cobertura
357356
solargraph

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Additionally, developers will be interested in the following:
6060

6161
=== Prerequisites
6262

63-
UnifiedDB tools are set up to run in a container. Both Docker (any version) and Singularity/Apptainer (`Singularity CE >= 3.3` or `Apptainer >= 1.0`) are supported.
63+
UnifiedDB tools are set up to run in a container. Docker (any version), Podman (any version), and Singularity/Apptainer (`Singularity CE >= 3.3` or `Apptainer >= 1.0`) are supported.
6464

6565
=== Devcontainer
6666

Rakefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ namespace :test do
120120
# "Run the cross-validation against LLVM"
121121
task :llvm do
122122
begin
123-
sh "#{$root}/.home/.venv/bin/python3 -m pytest ext/auto-inst/test_parsing.py -v"
124-
rescue => e
125-
raise unless e.message.include?("status (5)") # don't fail on skipped tests
126-
end
123+
sh "/opt/venv/bin/python3 -m pytest ext/auto-inst/test_parsing.py -v"
124+
rescue => e
125+
raise unless e.message.include?("status (5)") # don't fail on skipped tests
126+
end
127127
end
128128
# "Run the IDL compiler test suite"
129129
task :idl_compiler do

backends/cfg_html_doc/html_gen.rake

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ rule %r{#{$root}/gen/cfg_html_doc/.*/antora/playbook.yaml} => proc { |tname|
119119
snapshot: true
120120
supplemental_files:
121121
- path: css/vendor/tabs.css
122-
contents: #{$root}/node_modules/@asciidoctor/tabs/dist/css/tabs.css
122+
contents: /opt/node/node_modules/@asciidoctor/tabs/dist/css/tabs.css
123123
- path: js/vendor/tabs.js
124-
contents: #{$root}/node_modules/@asciidoctor/tabs/dist/js/tabs.js
124+
contents: /opt/node/node_modules/@asciidoctor/tabs/dist/js/tabs.js
125125
- path: partials/footer-scripts.hbs
126126
contents: |
127127
<script id="site-script" src="{{{uiRootPath}}}/js/site.js" data-ui-root-path="{{{uiRootPath}}}"></script>
@@ -234,10 +234,9 @@ rule %r{#{$root}/\.stamps/html-gen-.*\.stamp} => proc { |tname|
234234
playbook_path = $root / "gen" / "cfg_html_doc" / config_name / "antora" / "playbook.yaml"
235235
Rake::Task[playbook_path].invoke
236236

237-
$logger.info "Running Antora under npm to create #{config_name}"
238-
237+
$logger.info "Running Antora to create #{config_name}"
239238
sh [
240-
"npm exec -- antora",
239+
"/opt/node/node_modules/.bin/antora",
241240
"--stacktrace",
242241
"generate",
243242
"--cache-dir=#{$root}/.home/.antora",
@@ -247,7 +246,7 @@ rule %r{#{$root}/\.stamps/html-gen-.*\.stamp} => proc { |tname|
247246
playbook_path
248247
].join(" ")
249248

250-
$logger.info "Done running Antora under npm to create #{config_name}"
249+
$logger.info "Done running Antora to create #{config_name}"
251250

252251
FileUtils.touch t.name
253252
end

backends/ext_pdf_doc/tasks.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ rule %r{#{$resolver.gen_path}/ext_pdf_doc/.*/pdf/.*_extension\.pdf} => proc { |t
3434
"-a pdf-theme=#{ENV['THEME']}",
3535
"-a pdf-fontsdir=#{$root}/ext/docs-resources/fonts",
3636
"-a imagesdir=#{$root}/ext/docs-resources/images",
37-
"-a wavedrom=#{$root}/node_modules/.bin/wavedrom-cli",
37+
"-a wavedrom=/opt/node/node_modules/.bin/wavedrom-cli",
3838
"-r asciidoctor-diagram",
3939
"-r idl_highlighter",
4040
"-o #{t.name}",
@@ -63,7 +63,7 @@ rule %r{#{$resolver.gen_path}/ext_pdf_doc/.*/html/.*_extension\.html} => proc {
6363
"-v",
6464
"-a toc",
6565
"-r asciidoctor-diagram",
66-
"-a wavedrom=#{$root}/node_modules/.bin/wavedrom-cli",
66+
"-a wavedrom=/opt/node/node_modules/.bin/wavedrom-cli",
6767
"-o #{t.name}",
6868
adoc_file
6969
].join(" ")

backends/generators/tasks.rake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ namespace :gen do
2828
inst_dir = cfg_arch.path / "inst"
2929
csr_dir = cfg_arch.path / "csr"
3030

31-
# Run the Go generator script using the same Python environment
31+
# Run the Go generator script
3232
# Note: The script uses --output not --output-dir
33-
sh "#{$root}/.home/.venv/bin/python3 #{$root}/backends/generators/Go/go_generator.py --inst-dir=#{inst_dir} --csr-dir=#{csr_dir} --output=#{output_dir}inst.go"
33+
sh "/opt/venv/bin/python3 #{$root}/backends/generators/Go/go_generator.py --inst-dir=#{inst_dir} --csr-dir=#{csr_dir} --output=#{output_dir}inst.go"
3434
end
3535

3636
desc <<~DESC
@@ -79,9 +79,9 @@ namespace :gen do
7979
resolved_codes_file.flush
8080

8181
begin
82-
# Run the C header generator script using the same Python environment
82+
# Run the C header generator script
8383
# The script generates encoding.h for inclusion in C programs
84-
sh "#{$root}/.home/.venv/bin/python3 #{$root}/backends/generators/c_header/generate_encoding.py --inst-dir=#{inst_dir} --csr-dir=#{csr_dir} --ext-dir=#{ext_dir} --resolved-codes=#{resolved_codes_file.path} --output=#{output_dir}encoding.out.h --include-all"
84+
sh "/opt/venv/bin/python3 #{$root}/backends/generators/c_header/generate_encoding.py --inst-dir=#{inst_dir} --csr-dir=#{csr_dir} --ext-dir=#{ext_dir} --resolved-codes=#{resolved_codes_file.path} --output=#{output_dir}encoding.out.h --include-all"
8585
ensure
8686
resolved_codes_file.close
8787
resolved_codes_file.unlink

0 commit comments

Comments
 (0)