-
Notifications
You must be signed in to change notification settings - Fork 1
152 lines (120 loc) · 5.33 KB
/
fedora_latest_riscv64.yml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: fedora latest riscv64
on: [push, pull_request]
jobs:
build_job:
# The host should always be linux
runs-on: ubuntu-22.04
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
# Run steps on a matrix of 4 arch/distro combinations
strategy:
matrix:
include:
- arch: riscv64
distro: fedora_latest
steps:
- uses: actions/checkout@v4
- uses: uraimo/[email protected]
name: Build
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
# Not required, but speeds up builds
githubToken: ${{ github.token }}
# Create an artifacts directory
setup: |
mkdir -p "${PWD}/artifacts"
# Mount the artifacts directory as /artifacts in the container
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
# Pass some environment variables to the container
env: | # YAML, but pipe character is necessary
artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
# The shell to run commands with in the container
shell: /bin/sh
# Install some dependencies in the container. This speeds up builds if
# you are also using githubToken. Any dependencies installed here will
# be part of the container image that gets cached, so subsequent
# builds don't have to re-install them. The image layer is cached
# publicly in your project's package repository, so it is vital that
# no secrets are present in the container state or logs.
install: |
case "${{ matrix.distro }}" in
ubuntu*|jessie|stretch|buster|bullseye)
echo "-----------------------------------------------------"
echo "> uname -a"
uname -a
echo "-----------------------------------------------------"
echo "> cat /etc/issue"
cat /etc/issue
echo "-----------------------------------------------------"
echo "> apt-get update -q -y"
apt-get update -q -y
echo "-----------------------------------------------------"
echo "> apt-get install -q -y git libpam0g-dev autoconf make gcc clang"
apt-get install -q -y git libpam0g-dev autoconf make gcc clang
echo "-----------------------------------------------------"
echo "> autoconf --version"
autoconf --version
echo "-----------------------------------------------------"
echo "> make -v"
make -v
echo "-----------------------------------------------------"
echo "> gcc -v"
gcc -v
echo "-----------------------------------------------------"
echo "> clang -v"
clang -v
echo "-----------------------------------------------------"
echo "> git clone"
git clone https://github.com/alexander-naumov/gnu-screen.git
echo "-----------------------------------------------------"
echo "> cd gnu-screen/src/"
cd gnu-screen/src
echo "-----------------------------------------------------"
echo "> ./autogen.sh"
./autogen.sh
echo "-----------------------------------------------------"
echo "> cc=gcc ./configure CFLAGS='-Wall'"
cc=gcc ./configure CFLAGS="-Wall"
echo "-----------------------------------------------------"
echo "> make"
make
echo "-----------------------------------------------------"
echo "> ./screen -v"
./screen -v
echo "-----------------------------------------------------"
echo "> ./screen -ls"
./screen -ls || echo $?
echo "-----------------------------------------------------"
echo "> make clean"
make clean
echo "-----------------------------------------------------"
echo "> cc=clang ./configure CFLAGS='-Wall'"
cc=clang ./configure CFLAGS="-Wall"
echo "-----------------------------------------------------"
echo "> make"
make
echo "-----------------------------------------------------"
echo "> ./screen -v"
./screen -v
echo "-----------------------------------------------------"
echo "> ./screen -ls"
./screen -ls || echo $?
echo "-----------------------------------------------------"
echo "> ./screen --help"
./screen --help
;;
fedora*)
dnf -y update
dnf -y install git which
;;
alpine*)
apk update
apk add git
;;
esac
run: |
uname -a
cp $(which git) "/artifacts/${artifact_name}"
echo "Produced artifact at /artifacts/${artifact_name}"