Let data section contain only necessary data (for #12) #26
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
name: Build and Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, reopened, synchronize, ready_for_review] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions/setup-go@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get install device-tree-compiler | |
- name: Get Spike Cache Key | |
id: get-spike-cache-key | |
run: | | |
echo "key=$(git ls-remote https://github.com/riscv-software-src/riscv-isa-sim.git HEAD | awk '{print $1}')" >> $GITHUB_OUTPUT | |
- name: Cache Spike | |
id: cache-spike | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/riscv | |
key: ${{ runner.os }}-${{ steps.get-spike-cache-key.outputs.key }}-spike | |
- name: Install Toolchain | |
if: steps.cache-spike.outputs.cache-hit != 'true' | |
run: | | |
wget -O- -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.07.07/riscv64-elf-ubuntu-22.04-gcc-nightly-2023.07.07-nightly.tar.gz | tar -xzf - | |
- name: Build Spike | |
if: steps.cache-spike.outputs.cache-hit != 'true' | |
run: | | |
git clone --depth=1 https://github.com/riscv-software-src/riscv-isa-sim.git | |
cd riscv-isa-sim | |
mkdir build | |
cd build | |
../configure --prefix=${{ github.workspace }}/riscv | |
make -j4 | |
sudo make install | |
- name: Build and Test | |
run: | | |
export PATH="${{ github.workspace }}/riscv/bin:$PATH" | |
export RISCV="${{ github.workspace }}/riscv" | |
make -j4 | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Final sources and binaries | |
path: | | |
out/v256x64machine/tests/stage2/* | |
out/v256x64machine/bin/stage2/* |