Skip to content

Commit

Permalink
BUGFIX for vlazzarini#3. Add CI and self-test
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed May 8, 2024
1 parent 5be625e commit fb67cf5
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 9 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: ci

on:
push:
paths:
- "**.f"
- "**.c"
- "**/CMakeLists.txt"
- ".github/workflows/ci.yml"

jobs:

core:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]

runs-on: ubuntu-latest

env:
FC: gfortran-13

steps:
- uses: actions/checkout@v4

- run: cmake -B build
- run: cmake --build build
- run: ctest --test-dir build
- run: cmake --install build
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ add_program(pass2)
add_program(pass3)
add_program(raw2wav c)
add_program(music5 c)

enable_testing()

add_test(NAME ScoreCat513 COMMAND music5 ${CMAKE_CURRENT_SOURCE_DIR}/scores/cat513 cat513.wav)
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
MUSIC V
=================
# MUSIC V

[![Actions Status](https://github.com/vlazzarini/MUSICV/workflows/ci/badge.svg)](https://github.com/vlazzarini/MUSICV/actions)

This is Max Mathew's MUSIC V synthesis program, prepared by
Bill Schottstaed for gfortran, with further
additions and fixes by Victor Lazzarini.

Building
------
## Building

To build MUSIC V you will need to install a Fortran compiller. The
gfortran compiler, which you can find at
http://gcc.gnu.org/wiki/GFortran, has been tested and the sources
are kept up to date with it. You willl also need CMake and a C
To build MUSIC V you will need to install a Fortran compiller such
as [GFortran](http://gcc.gnu.org/wiki/GFortran), has been tested and the sources
are kept up to date with it. You will also need CMake and a C
compiler installation.

With these installed, build MUSIC V:
Expand Down
3 changes: 2 additions & 1 deletion src/music5.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ int main(int argc, char *argv[])
strcpy(cwd, ".");

/* copy score to working directory */
snprintf(buf, BUFSIZE, "cp %s %s/", argv[1], cwd);
snprintf(buf, BUFSIZE, "cp %s %s/score", argv[1], cwd);
printf("%s\n", buf);
if(system(buf))
return EXIT_FAILURE;

Expand Down

0 comments on commit fb67cf5

Please sign in to comment.