-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (78 loc) · 2.56 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# SPDX-FileCopyrightText: 2024 Luca Bassi
# SPDX-License-Identifier: GPL-3.0-or-later
name: Build package
on: [push, pull_request]
jobs:
build-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install cmake gcc-riscv64-unknown-elf libelf-dev libsigc++-2.0-dev libboost-dev libboost-program-options-dev qt6-base-dev libglx-dev libgl1-mesa-dev
- name: Create .deb
run: |
mkdir build
cd build
cmake ..
cpack -G DEB
- uses: actions/upload-artifact@v4
with:
name: build-ubuntu
path: build/*.deb
build-debian:
runs-on: ubuntu-latest
container: 'debian:latest'
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update -y
apt-get install -y g++ cmake gcc-riscv64-unknown-elf libelf-dev libsigc++-2.0-dev libboost-dev libboost-program-options-dev qt6-base-dev libglx-dev libgl1-mesa-dev
- name: Create .deb
run: |
mkdir build
cd build
cmake ..
cpack -G DEB
- uses: actions/upload-artifact@v4
with:
name: build-debian
path: build/*.deb
build-fedora:
runs-on: ubuntu-latest
container: 'fedora:latest'
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: |
dnf upgrade -y
dnf install -y gcc-c++ cmake gcc-riscv64-linux-gnu elfutils-libelf-devel libsigc++20-devel boost-devel qt6-qtbase-devel rpm-build
- name: Create .rpm
run: |
mkdir build
cd build
cmake -DRISCV_TOOL_PREFIX="riscv64-linux-gnu-" ..
cpack -G RPM
- uses: actions/upload-artifact@v4
with:
name: build-fedora
path: build/*.rpm
publish:
needs: [build-ubuntu, build-debian, build-fedora]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Create release
run: |
gh release delete latest --cleanup-tag --yes || true
gh release create latest --title "Latest release" --notes "Only Debian stable is officially supported" build-ubuntu/* build-debian/* build-fedora/*