criscv/.forgejo/workflows/build.yml

28 lines
1,020 B
YAML
Raw Normal View History

2024-10-19 13:06:27 +02:00
on: [push]
jobs:
deploy:
runs-on: docker
2024-10-19 17:41:22 +02:00
container: debian:bookworm
2024-10-19 13:06:27 +02:00
steps:
2024-10-19 20:11:21 +02:00
- name: Prepare for installation
run: dpkg --add-architecture amd64 && apt update
2024-10-19 13:35:46 +02:00
- name: Install prerequisites
2024-10-19 13:47:06 +02:00
run: apt install -y git ca-certificates
2024-10-19 13:06:27 +02:00
- name: Install toolchain
2024-10-19 17:34:24 +02:00
run: apt install -y gcc gcc-x86-64-linux-gnu:arm64 make:arm64
2024-10-19 20:11:21 +02:00
- name: Install program dependencies
2024-10-19 17:28:32 +02:00
run: apt install -y libelf-dev:arm64 libelf-dev:amd64
2024-10-19 20:11:21 +02:00
2024-10-19 13:06:27 +02:00
- name: Clone repository
2024-10-19 13:51:46 +02:00
run: git clone https://git.m724.eu/Minecon724/criscv.git .
2024-10-19 13:06:27 +02:00
- name: Package for x86_64
2024-10-19 20:03:31 +02:00
run: CC=x86_64-linux-gnu-gcc PROGRAM_NAME=criscv-x86_64 make && rm -rf build/obj
2024-10-19 13:06:27 +02:00
- name: Package for aarch64
2024-10-19 20:03:31 +02:00
run: CC=aarch64-linux-gnu-gcc PROGRAM_NAME=criscv-aarch64 make
2024-10-19 18:25:53 +02:00
2024-10-19 20:11:21 +02:00
- name: No escape from unnecessary nodejs
run: apt install -y nodejs
2024-10-19 13:06:27 +02:00
- name: Upload artifact
2024-10-19 20:11:21 +02:00
uses: https://github.com/actions/upload-artifact@v3
2024-10-19 13:06:27 +02:00
with:
path: build/criscv-*