Skip to content

Commit

Permalink
Add action to build legacy software
Browse files Browse the repository at this point in the history
  • Loading branch information
marnovandermaas committed May 17, 2024
1 parent 388e8ff commit d2faed3
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CMake

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt install srecord
mkdir -p /tools/riscv
curl -sSfL https://github.com/lowRISC/lowrisc-toolchains/releases/download/20230427-1/lowrisc-toolchain-gcc-rv32imcb-20230427-1.tar.xz | tar -xzf -C /tools/riscv --strip-components=1
echo "/tools/riscv/bin" >> $GITHUB_PATH
- name: Linting
run: find -name "*.[cc|c|h]" -exec clang-format -n {} \;

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: |
cd sw/legacy
mkdir build
cd build
cmake ..
- name: Build
# Build your program with the given configuration
run: |
cd sw/legacy/build
make

0 comments on commit d2faed3

Please sign in to comment.