-
Notifications
You must be signed in to change notification settings - Fork 0
168 lines (146 loc) · 4.86 KB
/
diffblas.yml
File metadata and controls
168 lines (146 loc) · 4.86 KB
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: diffblas
on:
push:
branches:
- main
pull_request:
jobs:
run-mode:
name: "Mode ${{ matrix.mode_name }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- mode_name: forward
mode_option: -d
- mode_name: reverse
mode_option: -b
- mode_name: vector-forward
mode_option: -dv
- mode_name: vector-reverse
mode_option: -bv
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make gfortran git
- name: Clone BLAS / LAPACK
run: |
git clone https://github.com/Reference-LAPACK/lapack.git
cd lapack
git checkout v3.12.1
echo "LAPACKDIR=$PWD" >> $GITHUB_ENV
- name: Compile BLAS / LAPACK
run: |
cd $LAPACKDIR
mkdir build && cd build
cmake .. \
-DCBLAS=ON \
-DLAPACKE=ON \
-DCMAKE_INSTALL_PREFIX=$LAPACKDIR \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_INDEX64_EXT_API=OFF \
-DTEST_FORTRAN_COMPILER=OFF \
-DLAPACKE_WITH_TMG=OFF
make -j$(nproc)
make install
cp $LAPACKDIR/lib/libblas.a $LAPACKDIR/librefblas.a
cp $LAPACKDIR/lib/libcblas.a $LAPACKDIR/librefcblas.a
cp $LAPACKDIR/lib/liblapack.a $LAPACKDIR/libreflapack.a
cp $LAPACKDIR/lib/liblapacke.a $LAPACKDIR/libreflapacke.a
- name: Clone Tapenade
run: |
git clone https://gitlab.inria.fr/tapenade/tapenade.git
cd tapenade
git checkout develop
echo "TAPENADEDIR=$PWD" >> $GITHUB_ENV
- name: Build tests for mode ${{ matrix.mode_name }}
run: |
cd BLAS
make ${{ matrix.mode_name }}
- name: Run tests for mode ${{ matrix.mode_name }}
run: |
cd BLAS
chmod +x run_tests.sh
./run_tests.sh ${{ matrix.mode_option }}
- name: Dashboard for mode ${{ matrix.mode_name }}
run: |
cd BLAS
chmod +x dashboard.sh
./dashboard.sh ${{ matrix.mode_option }}
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: results-${{ matrix.mode_name }}
path: BLAS/results-${{ matrix.mode_name }}.log
dashboard-summary:
name: "Dashboard"
needs: run-mode
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: results-forward
path: results/
- uses: actions/download-artifact@v4
with:
name: results-vector-forward
path: results/
- uses: actions/download-artifact@v4
with:
name: results-reverse
path: results/
- uses: actions/download-artifact@v4
with:
name: results-vector-reverse
path: results/
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1"
arch: x64
- name: Run Julia dashboard
run: julia ./.github/julia/make_dashboard.jl
- name: Display dashboard
run: |
echo "### Dashboard" >> $GITHUB_STEP_SUMMARY
cat dashboard.md >> $GITHUB_STEP_SUMMARY
# - name: Comment dashboard in PR
# if: github.event.pull_request.head.repo.fork == false
# uses: actions/github-script@v6
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# script: |
# const fs = require('fs');
# const filePath = 'dashboard.md';
# const msg = fs.readFileSync(filePath, 'utf8');
# const prNumber = context.payload.pull_request.number;
# // Fetch existing comments on the PR
# const { data: comments } = await github.rest.issues.listComments({
# owner: context.repo.owner,
# repo: context.repo.repo,
# issue_number: prNumber
# });
# // Look for previous comment by GitHub Actions bot (id 41898282)
# const botComment = comments.find(c => c.user.id === 41898282);
# if (botComment) {
# await github.rest.issues.updateComment({
# owner: context.repo.owner,
# repo: context.repo.repo,
# comment_id: botComment.id,
# body: msg
# });
# } else {
# await github.rest.issues.createComment({
# owner: context.repo.owner,
# repo: context.repo.repo,
# issue_number: prNumber,
# body: msg
# });
# }