test #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
cd .. | |
rm -rf build | |
- 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 matrix_multiplication.sif matrixA.txt matrixB.txt [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' | |
- name: Download output and error logs | |
env: | |
SSH_USER: ${{ secrets.SSH_USER }} | |
SSH_PASS: ${{ secrets.SSH_PASS }} | |
run: | | |
sshpass -p $SSH_PASS scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected]:.output.txt output.txt | |
sshpass -p $SSH_PASS scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected]:.error.txt error.txt | |
- name: Upload Output log | |
uses: actions/[email protected] | |
with: | |
name: output | |
path: output.txt | |
- name: Upload Error log | |
uses: actions/[email protected] | |
with: | |
name: error | |
path: error.txt |