Skip to content

Commit

Permalink
ci: Add Build workflow (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisklein authored Feb 26, 2024
2 parents b4ecd19 + 0d43224 commit 78913cf
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 5 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
name: Build with Slurm ${{ matrix.slurm }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}

env:
SOURCEDIR: ${{ github.workspace }}
BUILDDIR: ${{ github.workspace}}/build

strategy:
fail-fast: false

matrix:
container:
- ubuntu:lunar
- ubuntu:mantic
- ubuntu:noble
include:
- container: ubuntu:lunar
slurm: 22.05
- container: ubuntu:mantic
slurm: 23.02
- container: ubuntu:noble
slurm: 23.11

steps:
- name: Install dependencies
run: sudo apt-get install -y cmake ninja-build libslurm-dev

- uses: actions/checkout@v4

- name: Configure
run: cmake -GNinja -S $SOURCEDIR -B $BUILDDIR

- name: Build
run: cmake --build $BUILDDIR
#
# - name: Test
# run: ctest --test-dir $BUILDDIR
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ File | Description
> release. [^bk1WA]
Build this plug-in using `g++` from the GNU Compiler Collection (GCC) version 8
or newer. The plug-ins are compiled against this header file `spank.h` [02].
or newer. The plug-ins are compiled against the header file `<slurm/spank.h>`.
Fedora distributes this file in the `slurm-devel` RPM package [^DoUiD]. CMake is
available via the `cmake` package.

```sh
cmake -S . -B build # configure the project and choose a build dir
cmake --build build # build the Singularity SPANK plug-in
sudo cmake --install build # install the binary and configuration files
# on older CMake: cmake --build build --target install
# on older CMake: sudo cmake --build build --target install
```

By default the plug-in `singularity-exec.so` is installed to `/usr/lib64/slurm`.
Expand Down Expand Up @@ -156,6 +156,26 @@ sudo cmake --install build # install the binary and configuration files
sudo systemctl enable --now munge slurmctld slurmd
```

## License

```
Copyright © 2020-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
Matthias Kretz <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
```

## References

[^bk1WA]: SPANK - Slurm Plug-in Architecture
Expand All @@ -176,7 +196,7 @@ sudo systemctl enable --now munge slurmctld slurmd
[^DoUiD]: Fedora Slurm RPM Package
<https://src.fedoraproject.org/rpms/slurm>

[99]: singularity-exec.conf
[99]: singularity-exec.conf.in
[98]: slurm-singularity-wrapper.sh
[97]: containers.sh
[96]: Vagrantfile
Expand Down
4 changes: 2 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*{{{
Copyright © 2020 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
Matthias Kretz <[email protected]>
Copyright © 2020-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
Matthias Kretz <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down

0 comments on commit 78913cf

Please sign in to comment.