generated from SimoneReale/SE4HPC_project_part2
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (63 loc) · 2.01 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install MPI
run: sudo apt-get install -y libopenmpi-dev
- name: Setup Cmake
run: sudo apt-get install -y cmake
- name: Build
run: |
./build.sh
- name: Run Tests
run: |
cd build
./test_multiplication
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
cryptsetup \
fuse2fs \
git \
fuse \
libfuse-dev \
libseccomp-dev \
libtool \
pkg-config \
runc \
squashfs-tools \
squashfs-tools-ng \
uidmap \
wget \
zlib1g-dev
- name: Install Singularity
run: |
wget https://github.com/sylabs/singularity/releases/download/v4.1.3/singularity-ce_4.1.3-jammy_amd64.deb
sudo dpkg -i singularity-ce_4.1.3-jammy_amd64.deb
- name: Build Singularity Image
run: |
sudo singularity build matrix_multiplication.sif Singularity.def
- name: Install sshpass
run: |
sudo apt-get update && sudo apt-get install -y sshpass
- name: Transfer stuff via scp
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PASS: ${{ secrets.SSH_PASS }}
run: |
sshpass -p $SSH_PASS scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null job.sh [email protected]:.
sshpass -p $SSH_PASS scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null matrix_multiplication.sif [email protected]:.
- name: Run job on Cineca
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PASS: ${{ secrets.SSH_PASS }}
run: |
sshpass -p $SSH_PASS ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected] 'sbatch job.sh'