@@ -3,13 +3,55 @@ name: Pipeline
3
3
on :
4
4
workflow_call :
5
5
6
+ env :
7
+ IMAGE : ghcr.io/f4pga/prjxray/ci
8
+
6
9
jobs :
7
10
8
11
9
- BuildDatabase :
10
- container : ubuntu:bionic
12
+ Dependencies :
13
+ runs-on : ubuntu-latest
14
+ permissions :
15
+ packages : write
16
+
17
+ steps :
18
+
19
+ - run : |
20
+ docker build -t $IMAGE - <<EOF
21
+ FROM ubuntu:bionic
22
+ RUN apt-get update -qq \
23
+ && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
24
+ bash \
25
+ bison \
26
+ build-essential \
27
+ ca-certificates \
28
+ clang-format \
29
+ cmake \
30
+ psmisc \
31
+ colordiff \
32
+ coreutils \
33
+ git \
34
+ flex \
35
+ python3 \
36
+ python3-dev \
37
+ python3-venv \
38
+ xsltproc \
39
+ && apt-get autoclean && apt-get clean && apt-get -y autoremove \
40
+ && update-ca-certificates \
41
+ && rm -rf /var/lib/apt/lists/*
42
+
43
+ - uses : pyTooling/Actions/with-post-step@r0
44
+ with :
45
+ main : |
46
+ echo '${{ github.token }}' | docker login ghcr.io -u gha --password-stdin
47
+ docker push $IMAGE
48
+ post : docker logout ghcr.io
11
49
50
+
51
+ BuildDatabase :
52
+ needs : Dependencies
12
53
runs-on : [self-hosted, Linux, X64]
54
+ container : $IMAGE
13
55
14
56
strategy :
15
57
fail-fast : false
27
69
with :
28
70
submodules : recursive
29
71
30
- - name : Install
31
- run : |
32
- apt update
33
- apt install -y \
34
- bash bison build-essential ca-certificates clang-format cmake psmisc \
35
- colordiff coreutils git flex python3 python3-dev python3-venv xsltproc
36
-
37
72
- name : Build
38
73
run : make build --output-sync=target --warn-undefined-variables -j$(nproc)
39
74
61
96
62
97
63
98
Tests :
64
- container : ubuntu:bionic
65
-
99
+ needs : Dependencies
66
100
runs-on : [self-hosted, Linux, X64]
101
+ container : $IMAGE
67
102
68
103
env :
69
104
ALLOW_ROOT : true
@@ -74,13 +109,6 @@ jobs:
74
109
with :
75
110
submodules : recursive
76
111
77
- - name : Install
78
- run : |
79
- apt update
80
- apt install -y \
81
- bash bison build-essential ca-certificates clang-format cmake psmisc \
82
- colordiff coreutils git flex python3 python3-dev python3-venv xsltproc
83
-
84
112
- name : Build
85
113
run : make build --output-sync=target --warn-undefined-variables -j$(nproc)
86
114
0 commit comments