From b968a4f13479e2be39bb1acca6df0e671ffb9714 Mon Sep 17 00:00:00 2001 From: Martin Petr Date: Mon, 7 Oct 2024 11:36:07 +0200 Subject: [PATCH] Put back ADMIXTOOLS into the CI pipeline --- .github/workflows/R-CMD-check.yaml | 96 ++++++++++++++-------------- .github/workflows/test-coverage.yaml | 86 ++++++++++++------------- 2 files changed, 91 insertions(+), 91 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index ad9a5ff51..d43c0621e 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -48,56 +48,56 @@ jobs: if: runner.os == 'macOS' run: brew install gdal - # - name: Install ADMIXTOOLS dependencies (Linux) - # if: runner.os == 'Linux' - # run: sudo apt-get install libopenblas-dev libgsl-dev liblapack-dev + - name: Install ADMIXTOOLS dependencies (Linux) + if: runner.os == 'Linux' + run: sudo apt-get install libopenblas-dev libgsl-dev liblapack-dev - # - name: Install ADMIXTOOLS dependencies (macOS) - # if: runner.os == 'macOS' - # run: brew install openblas gsl lapack bedtools + - name: Install ADMIXTOOLS dependencies (macOS) + if: runner.os == 'macOS' + run: brew install openblas gsl lapack bedtools - # - name: Compile and install ADMIXTOOLS (Linux) # + macOS) - # # if: runner.os != 'Windows' - # if: runner.os == 'Linux' - # run: | - # # create a single directory for all external software - # mkdir -p ~/deps - # cd ~/deps - # - # # download and unpack the ADMIXTOOLS source code - # curl -LO https://github.com/DReichLab/AdmixTools/archive/v7.0.2.tar.gz - # tar xf v7.0.2.tar.gz - # cd AdmixTools-7.0.2 - # - # # set compiler flags (compilation on macOS was failing unable to find - # # openblas library files) - # export LDFLAGS="-L/usr/local/opt/openblas/lib" - # export CPPFLAGS="-I/usr/local/opt/openblas/include" - # - # # compile ADMIXTOOLS and move binaries under bin/ - # cd src - # make clobber - # make LDLIBS="-llapack" all - # make install - # - # # download testing data for unit tests - # cd ../ - # curl -LO https://reich.hms.harvard.edu/sites/reich.hms.harvard.edu/files/inline-files/AdmixTools_Example_Data.tar_.gz - # tar xf AdmixTools_Example_Data.tar_.gz - # - # # run the Perl script with tests for the compiled binaries - # cd examples - # # fix unportable Perl shebang - # if [[ "$OSTYPE" == "darwin"* ]]; then - # sed -i '' "1s/.*/\#\!\/usr\/bin\/env perl -w/" mklog - # else - # sed -i "1s/.*/\#\!\/usr\/bin\/env perl/" mklog - # fi - # ./mklog - # cd ../ - # - # # we need to do this in bash because of $OSTYPE above - # shell: bash + - name: Compile and install ADMIXTOOLS (Linux) # + macOS) + # if: runner.os != 'Windows' + if: runner.os == 'Linux' + run: | + # create a single directory for all external software + mkdir -p ~/deps + cd ~/deps + + # download and unpack the ADMIXTOOLS source code + curl -LO https://github.com/DReichLab/AdmixTools/archive/v7.0.2.tar.gz + tar xf v7.0.2.tar.gz + cd AdmixTools-7.0.2 + + # set compiler flags (compilation on macOS was failing unable to find + # openblas library files) + export LDFLAGS="-L/usr/local/opt/openblas/lib" + export CPPFLAGS="-I/usr/local/opt/openblas/include" + + # compile ADMIXTOOLS and move binaries under bin/ + cd src + make clobber + make LDLIBS="-llapack" all + make install + + # download testing data for unit tests + cd ../ + curl -LO https://reich.hms.harvard.edu/sites/reich.hms.harvard.edu/files/inline-files/AdmixTools_Example_Data.tar_.gz + tar xf AdmixTools_Example_Data.tar_.gz + + # run the Perl script with tests for the compiled binaries + cd examples + # fix unportable Perl shebang + if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' "1s/.*/\#\!\/usr\/bin\/env perl -w/" mklog + else + sed -i "1s/.*/\#\!\/usr\/bin\/env perl/" mklog + fi + ./mklog + cd ../ + + # we need to do this in bash because of $OSTYPE above + shell: bash - name: Compile and install SLiM on Unix if: runner.os != 'Windows' diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 0bef1afcd..c978310cb 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -25,49 +25,49 @@ jobs: if: runner.os == 'macOS' run: brew install gdal - # - name: Install ADMIXTOOLS dependencies - # run: sudo apt-get install libopenblas-dev libgsl-dev liblapack-dev - - # - name: Compile and install ADMIXTOOLS - # run: | - # # create a single directory for all external software - # mkdir -p ~/deps - # cd ~/deps - # - # # download and unpack the ADMIXTOOLS source code - # curl -LO https://github.com/DReichLab/AdmixTools/archive/v7.0.2.tar.gz - # tar xf v7.0.2.tar.gz - # cd AdmixTools-7.0.2 - # - # # set compiler flags (compilation on macOS was failing unable to find - # # openblas library files) - # export LDFLAGS="-L/usr/local/opt/openblas/lib" - # export CPPFLAGS="-I/usr/local/opt/openblas/include" - # - # # compile ADMIXTOOLS and move binaries under bin/ - # cd src - # make clobber - # make LDLIBS="-llapack" all - # make install - # - # # download testing data for unit tests - # cd ../ - # curl -LO https://reich.hms.harvard.edu/sites/reich.hms.harvard.edu/files/inline-files/AdmixTools_Example_Data.tar_.gz - # tar xf AdmixTools_Example_Data.tar_.gz - # - # # run the Perl script with tests for the compiled binaries - # cd examples - # # fix unportable Perl shebang - # if [[ "$OSTYPE" == "darwin"* ]]; then - # sed -i '' "1s/.*/\#\!\/usr\/bin\/env perl -w/" mklog - # else - # sed -i "1s/.*/\#\!\/usr\/bin\/env perl/" mklog - # fi - # ./mklog - # cd ../ - # - # # we need to do this in bash because of $OSTYPE above - # shell: bash + - name: Install ADMIXTOOLS dependencies + run: sudo apt-get install libopenblas-dev libgsl-dev liblapack-dev + + - name: Compile and install ADMIXTOOLS + run: | + # create a single directory for all external software + mkdir -p ~/deps + cd ~/deps + + # download and unpack the ADMIXTOOLS source code + curl -LO https://github.com/DReichLab/AdmixTools/archive/v7.0.2.tar.gz + tar xf v7.0.2.tar.gz + cd AdmixTools-7.0.2 + + # set compiler flags (compilation on macOS was failing unable to find + # openblas library files) + export LDFLAGS="-L/usr/local/opt/openblas/lib" + export CPPFLAGS="-I/usr/local/opt/openblas/include" + + # compile ADMIXTOOLS and move binaries under bin/ + cd src + make clobber + make LDLIBS="-llapack" all + make install + + # download testing data for unit tests + cd ../ + curl -LO https://reich.hms.harvard.edu/sites/reich.hms.harvard.edu/files/inline-files/AdmixTools_Example_Data.tar_.gz + tar xf AdmixTools_Example_Data.tar_.gz + + # run the Perl script with tests for the compiled binaries + cd examples + # fix unportable Perl shebang + if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' "1s/.*/\#\!\/usr\/bin\/env perl -w/" mklog + else + sed -i "1s/.*/\#\!\/usr\/bin\/env perl/" mklog + fi + ./mklog + cd ../ + + # we need to do this in bash because of $OSTYPE above + shell: bash - name: Compile and install SLiM run: |