Skip to content
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

Add Linux Github Actions #75

Merged
merged 1 commit into from
Feb 9, 2025
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
39 changes: 39 additions & 0 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Linux

on:
- push
- pull_request
- workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- uses: actions/checkout@v3
- name: Install prerequisites
run: |
pacman -Sy --noconfirm base-devel git wget iverilog
useradd -m builduser
echo 'builduser ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
chown -R builduser /home/builduser

- name: Clone AUR package
run: |
sudo -u builduser git clone https://aur.archlinux.org/riscv32-gnu-toolchain-elf-bin.git /home/builduser/riscv32-toolchain

- name: Build and install toolchain
run: |
cd /home/builduser/riscv32-toolchain
sudo -u builduser makepkg -si --noconfirm
riscv32-unknown-elf-gcc -v

- name: Test
run: |
make

- name: Build and test
run: |
export CCPATH=$(dirname `command -v riscv32-unknown-elf-gcc`)
make clean all CROSS=riscv32-unknown-elf CCPATH=$CCPATH ARCH=rv32e_zicsr ABI=ilp32e ENDIAN=little
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# DarkRISCV
[![Build Status][WorkflowBadgeLinux]][WorkflowUrlLinux]

Opensource RISC-V implemented from scratch in one night!

![darkriscv](https://user-images.githubusercontent.com/42520878/109411184-01075f80-797f-11eb-8932-5b916133561a.jpg)
Expand Down Expand Up @@ -1244,3 +1246,6 @@ tested the *DarkRISCV*.
[4] https://abopen.com/news/darkriscv-an-overnight-bsd-licensed-risc-v-implementation/
[5] http://quasilyte.dev/blog/post/riscv32-custom-instruction-and-its-simulation/
[6] https://github.com/riscv/riscv-pk/blob/master/bbl/riscv_logo.txt

[WorkflowBadgeLinux]: https://github.com/nsauzede/darkriscv/workflows/Linux/badge.svg
[WorkflowUrlLinux]: https://github.com/nsauzede/darkriscv/actions/workflows/Linux.yml