This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (140 loc) · 4.47 KB
/
riscv32-llvm-centos7.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
153
# Copyright 2020 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: riscv32-llvm-centos7
on:
workflow_dispatch:
inputs:
llvmref:
description: 'Ref from the LLVM Repo'
required: false
default: 'main'
schedule:
- cron: '42 1 * * *'
jobs:
build:
runs-on: ubuntu-20.04
env:
PKGVERS: riscv32-pulp-llvm-centos7-${{ github.run_number }}
BUGURL: https://github.com/pulp-platform/llvm-project/issues
BUILDNO: ${{ github.run_number }}
SSH_PRIVATE_KEY: ${{secrets.SOURCEFORGE_SSH_PRIVATE_KEY}}
SSH_KNOWN_HOSTS: ${{secrets.SSH_KNOWN_HOSTS}}
SOURCEFORGE_KEY: ${{ github.workspace }}/../private.key
steps:
########################################
## Checkout
########################################
## This
-
name: Checkout
uses: actions/checkout@v2
## LLVM
-
name: Checkout LLVM
uses: actions/checkout@v2
with:
repository: pulp-platform/llvm-project
ref: ${{ github.event.inputs.llvmref }}
path: llvm-project
## NEWLIB
-
name: Checkout newlib
run: |
git clone --depth 1 -b newlib-3.3.0 https://sourceware.org/git/newlib-cygwin.git newlib
########################################
## Build docker container
########################################
-
name: Prepare Docker
uses: docker/build-push-action@v2
with:
push: false
file: docker/linux-centos7.Dockerfile
tags: linux-centos7:latest
########################################
## Build Info
########################################
-
name: Build Info
run: |
docker run -v $PWD:/home/builder -w/home/builder linux-centos7:latest ./builder-info.sh
cat build-info.txt
########################################
## Build
########################################
-
name: Build
run: |
docker run -v $PWD:/home/builder -w/home/builder \
-e BUGURL=${BUGURL} \
-e PKGVERS=${PKGVERS} \
-e BUILDNO=${BUILDNO} \
linux-centos7:latest \
./stages/build-riscv32-llvm.sh
########################################
## Package
########################################
-
name: Package
run: |
tar -czf ${PKGVERS}.tar.gz --transform s/^install/${PKGVERS}/ install
########################################
## Upload
########################################
-
name: Upload Build Info
uses: actions/upload-artifact@v2
with:
name: Build Info
path: |
build-info.txt
-
name: Upload Toolchain
uses: actions/upload-artifact@v2
with:
name: ${{ env.PKGVERS }}
path: ${{ env.PKGVERS }}.tar.gz
########################################
## Test
########################################
-
name: Test
run: |
docker run -v $PWD:/home/builder -w/home/builder \
-e BUGURL=${BUGURL} \
-e PKGVERS=${PKGVERS} \
linux-centos7:latest \
./stages/test-llvm.sh
-
name: Upload Test Info
uses: actions/upload-artifact@v2
with:
name: Test Info
path: llvm-tests.log
-
name: Test Snitch
run: |
docker run -v $PWD:/home/builder -w/home/builder \
linux-centos7:latest ./stages/test-snitch-llvm.sh
-
name: Upload Snitch Test Info
uses: actions/upload-artifact@v2
with:
name: Snitch Test Info
path: snitch-tests.log
########################################
## Deploy
########################################
-
name: deploy-prepare
run: |
mkdir -p ~/.ssh/
echo "${SSH_PRIVATE_KEY}" > ${SOURCEFORGE_KEY}
sudo chmod 600 ${SOURCEFORGE_KEY}
echo "${SSH_KNOWN_HOSTS}" > ~/.ssh/known_hosts
-
name: deploy-sourceforge
run: |
dstname=`echo ${PKGVERS} | rev | cut -d'-' -f 2- | rev`
scp -i ${SOURCEFORGE_KEY} ${PKGVERS}.tar.gz beeble42brox@frs.sourceforge.net:/home/frs/project/pulp-llvm-project/nightly/${dstname}.tar.gz