-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SEAL5 CI/CD Flow: Build ETISS #152
Open
kebi-be
wants to merge
10
commits into
tum-ei-eda:master
Choose a base branch
from
kebi-be:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
61608c0
Create workflow file for building etiss
kebi-be 8d6108f
Update build_etiss.yml
kebi-be 1e999cb
Changed etiss version to use version from coverage branch
kebi-be 6c6fb25
Fixed build error in git clone
kebi-be 2ee41e7
Update build_etiss.yml
kebi-be 3862a1a
fixed git clone option
kebi-be e0a355a
forced used of http instead of git: for repo clone
kebi-be e72a276
Fixed PR review comments
kebi-be 458dfc8
Updated workflow name
kebi-be 82167fd
Adde
kebi-be File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
name: Build ETISS for Custom Instructions | ||
|
||
on: | ||
repository_dispatch: | ||
types: [s4e-cdsl-event, seal5-event] | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: false | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
SEAL5_PREBUILT_DIR: /home/runner/work/etiss/etiss/seal5_prebuilt/release | ||
RISCV_GCC_NAME: riscv32-unknown-elf | ||
ARCH: rv32imc_xs4emac | ||
ETISS_ARCH: RV32IMCXS4EMAC | ||
PROG: s4emac | ||
ABI: ilp32 | ||
|
||
jobs: | ||
setup-run-m2isar: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
pip install virtualenv | ||
|
||
- name: Setup M2-ISA-R | ||
run: | | ||
git config --global url."https://github.com/".insteadOf [email protected]: | ||
git config --global url."https://".insteadOf git:// | ||
git clone https://github.com/PhilippvK/riscv-coredsl-extensions.git --branch etiss --recursive | ||
git clone https://github.com/tum-ei-eda/etiss_arch_riscv.git --recursive --branch coredsl_exceptions | ||
git clone https://github.com/tum-ei-eda/M2-ISA-R.git --branch coredsl2 | ||
cd M2-ISA-R | ||
virtualenv -p python3.10 venv | ||
source venv/bin/activate | ||
pip install -e . | ||
|
||
- name: Run M2-ISA-R | ||
run: | | ||
cd M2-ISA-R | ||
source venv/bin/activate | ||
python -m m2isar.frontends.coredsl2.parser ../riscv-coredsl-extensions/etiss-s4e-mac.core_desc | ||
python -m m2isar.backends.etiss.writer ../riscv-coredsl-extensions/gen_model/etiss-s4e-mac.m2isarmodel --separate --static-scalars | ||
|
||
- name: Upload M2ISAR Model artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: m2isar-model-files | ||
path: | | ||
riscv-coredsl-extensions/gen_output | ||
|
||
patch-etiss-arch: | ||
runs-on: ubuntu-22.04 | ||
needs: [setup-run-m2isar] | ||
steps: | ||
- name: Download Patched Etiss | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: m2isar-model-files | ||
github-token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
|
||
# - uses: actions/checkout@v4 | ||
# with: | ||
# path: etiss_source | ||
# ref: coverage | ||
|
||
- run: | | ||
git config --global url."https://github.com/".insteadOf [email protected]: | ||
git config --global url."https://".insteadOf git:// | ||
git clone [email protected]:wysiwyng/etiss.git etiss_source --branch coverage | ||
cp -r etiss-s4e-mac/* etiss_source/ArchImpl/ | ||
cd etiss_source | ||
cp ArchImpl/RV32IMACFD/RV32IMACFDArchSpecificImp.cpp ArchImpl/RV32IMCXS4EMAC/RV32IMCXS4EMACArchSpecificImp.cpp | ||
sed -i "s/RV32IMACFD/RV32IMCXS4EMAC/g" ArchImpl/RV32IMCXS4EMAC/RV32IMCXS4EMACArchSpecificImp.cpp | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git add --all | ||
git commit -m 'update etiss architectures' | ||
|
||
- name: Upload M2ISAR Model artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: patched_etiss | ||
path: | | ||
etiss_source | ||
|
||
build-etiss: | ||
runs-on: ubuntu-22.04 | ||
needs: [patch-etiss-arch] | ||
steps: | ||
- name: Install Build Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libboost-filesystem-dev libboost-program-options-dev \ | ||
llvm-11-dev libclang-11-dev clang-11 | ||
|
||
- name: Download Patched Etiss | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: patched_etiss | ||
github-token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
path: etiss_source | ||
|
||
- name: CMake config | ||
run: | | ||
cmake -B etiss_build -S etiss_source -DCMAKE_INSTALL_PREFIX=/home/runner/work/etiss_prebuilt -DCMAKE_BUILD_TYPE=$BUILD_TYPE | ||
|
||
- name: CMake build | ||
run: | | ||
cmake --build etiss_build -j$(nproc) | ||
|
||
- name: CMake install | ||
run: | | ||
cmake --build etiss_build --target install | ||
|
||
- name: Upload compiled ETISS | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: etiss_prebuilt | ||
path: /home/runner/work/etiss_prebuilt | ||
|
||
- name: Send ETISS RUN-ID to Seal5 | ||
uses: peter-evans/repository-dispatch@v3 | ||
with: | ||
token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please provide the secrets we need to add to the etiss repo settings (@kebi-be Oops, I just saw you comment) |
||
repository: ${{ 'kebi-be/seal5' }} | ||
event-type: etiss-event | ||
client-payload: '{"parent_repo_run-id": "${{ github.event.client_payload.run_id }}", "etiss_run_id": "${{ github.run_id }}"}' | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should ideally just clone the etiss repository using the
actions/checkout
action.(@kebi-be Oops, I just saw you comment)
To get rid of this, @wysiwyng would need to merge the coverage related commits to upstream etiss.