compile riscv in docker

This commit is contained in:
2025-08-25 21:31:48 -06:00
parent f8c7460b29
commit 70a53c200c

25
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: CI
on: push
jobs:
build:
name: Build C code
runs-on: ubuntu-latest
container:
image: plincar/riscv-gnu-toolchain:2023_03_12
# volumes:
# - my_docker_volume:/volume_mount
steps:
- uses: actions/checkout@v4
- name: Check for executables
run: |
# this really should have been added to path at install time when the container was made
export PATH=$PATH:/opt/riscv/gnu-toolchain/rv64/bin
riscv64-unknown-elf-gcc --version
- name: Build
run: |
cd tests/test_basic
# ls -lah
# cat Makefile
# make test.hex
export PATH=$PATH:/opt/riscv/gnu-toolchain/rv64/bin
riscv64-unknown-elf-as -march=rv32i -mabi=ilp32 test.S -o test.o