Skip to content

Commit

Permalink
CI: fix github-actions workflow.
Browse files Browse the repository at this point in the history
c45094c broke the workflow: CI triggered on PR (modified code) was
actually testing master codebase (untouched code). Solution:
- Drop pull_request_target: use pull_request
- Drop all docker jobs (which need pull_request_target to be based
  on master to be able to access opencollab secrets)
- Remove opencollab secrets (docker login and password)
- Drop coverage jobs (OK with TravisCI but never worked with
  github-actions)
  • Loading branch information
fghoussen committed Apr 10, 2022
1 parent 645db9e commit 7e85cb1
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 741 deletions.
121 changes: 52 additions & 69 deletions .github/workflows/jobs.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: arpack-ng
on: [push, pull_request_target]
on: [push, pull_request]
jobs:
ubuntu_latest_cmake:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}} # Branch where changes are implemented.
repository: ${{github.event.pull_request.head.repo.full_name}} # Repo where changes are implemented.
- name: Check commit
run: git log -1
run: |
git log -1
- name: Update OS
run: sudo apt-get update
- name: Install apt-get dependencies
Expand All @@ -25,8 +30,13 @@ jobs:
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}} # Branch where changes are implemented.
repository: ${{github.event.pull_request.head.repo.full_name}} # Repo where changes are implemented.
- name: Check commit
run: git log -1
run: |
git log -1
- name: Update OS
run: sudo apt-get update
- name: Install apt-get dependencies
Expand All @@ -43,8 +53,13 @@ jobs:
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}} # Branch where changes are implemented.
repository: ${{github.event.pull_request.head.repo.full_name}} # Repo where changes are implemented.
- name: Check commit
run: git log -1
run: |
git log -1
- name: Update OS
run: sudo apt-get update
- name: Install apt-get dependencies
Expand All @@ -68,8 +83,13 @@ jobs:
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}} # Branch where changes are implemented.
repository: ${{github.event.pull_request.head.repo.full_name}} # Repo where changes are implemented.
- name: Check commit
run: git log -1
run: |
git log -1
- name: Update OS
run: sudo apt-get update
- name: Install apt-get dependencies
Expand All @@ -87,74 +107,21 @@ jobs:
FCFLAGS: "-DMKL_ILP64 -I/usr/include/mkl"
LIBS: "-Wl,--no-as-needed -L/usr/lib/x86_64-linux-gnu -lmkl_sequential -lmkl_core -lpthread -lm -ldl"
INTERFACE64: "1"
ubuntu_latest_coverage:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Install apt-get dependencies
run: sudo apt-get install -y gfortran gcc g++ openmpi-bin libopenmpi-dev libblas-dev liblapack-dev cmake
- name: Run job
run: |
mkdir build
cd build
cmake -DEXAMPLES=ON -DMPI=ON -DICB=ON -DCOVERALLS=ON ..
make all
make test
make coveralls
docker_centos:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Login to Docker Hub
run: sudo docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_TOKEN }}"
- name: Run job
run: ./scripts/travis_centos.sh
docker_fedora:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Login to Docker Hub
run: sudo docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_TOKEN }}"
- name: Run job
run: ./scripts/travis_fedora.sh setup mpich
docker_debian:
runs-on: ubuntu-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
- name: Check commit
run: git log -1
- name: Update OS
run: sudo apt-get update
- name: Login to Docker Hub
run: sudo docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_TOKEN }}"
- name: Run job
run: ./scripts/travis_ubuntu.sh debian
macos_latest_cmake:
runs-on: macos-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}} # Branch where changes are implemented.
repository: ${{github.event.pull_request.head.repo.full_name}} # Repo where changes are implemented.
- name: Check commit
run: git log -1
run: |
git log -1
- name: Update OS
run: |
brew rm gcc
brew uninstall --ignore-dependencies gcc
brew update
softwareupdate --install --all
- name: Install brew dependencies
Expand All @@ -166,19 +133,30 @@ jobs:
run: |
mkdir -p build
cd build
LIBS="-framework Accelerate" FFLAGS="-ff2c -fno-second-underscore" FCFLAGS="-ff2c -fno-second-underscore" cmake -DBLA_VENDOR=Generic -DEXAMPLES=ON -DICB=ON -DMPI=ON ..
export FC=mpif90 # Uses gfortran.
export FFLAGS="-ff2c -fno-second-underscore"
export CC=mpicc # Uses clang.
export CFLAGS="-Qunused-arguments"
export CXX=mpic++ # Uses clang++.
export CXXFLAGS="-Qunused-arguments"
LIBS="-framework Accelerate" cmake -DBLA_VENDOR=Generic -DEXAMPLES=ON -DICB=ON -DMPI=ON ..
make all
make test
macos_latest_autotools:
runs-on: macos-latest
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}} # Branch where changes are implemented.
repository: ${{github.event.pull_request.head.repo.full_name}} # Repo where changes are implemented.
- name: Check commit
run: git log -1
run: |
git log -1
- name: Update OS
run: |
brew rm gcc
brew uninstall --ignore-dependencies gcc
brew update
softwareupdate --install --all
- name: Install brew dependencies
Expand All @@ -197,8 +175,13 @@ jobs:
steps:
- name: Clone and check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}} # Branch where changes are implemented.
repository: ${{github.event.pull_request.head.repo.full_name}} # Repo where changes are implemented.
- name: Check commit
run: git log -1
run: |
git log -1
- name: Update OS
run: |
choco install -y msys2
Expand Down
43 changes: 0 additions & 43 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ option(INTERFACE64 "use the 64-bit integer interface (ILP64) for ARPACK, BLAS an

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

# We don't want this to run on every build.
option(COVERALLS "Generate coveralls data" OFF)
if (COVERALLS)
include(Coveralls)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
# The no space is by design: issue in cmake. See CMP0004.
set(EXTRA_LDFLAGS "${EXTRA_LDFLAGS}-lgcov")
endif()

function(prefixlist list_name prefix)
set(${list_name}_TMP)
foreach(l ${${list_name}})
Expand Down Expand Up @@ -830,38 +819,6 @@ set(CPACK_SOURCE_IGNORE_FILES "/BUILD/" "/Build/" "/build/" "/local/") # Do not
set(CPACK_SOURCE_PACKAGE_FILE_NAME "arpack-ng-${CPACK_VERSION_MAJOR}.${CPACK_VERSION_MINOR}.${CPACK_VERSION_PATCH}")
include(CPack)

if (COVERALLS)
set(arpack_TST_SRC
${arpack_SOURCE_DIR}/TESTS/bug_1323.f
${arpack_SOURCE_DIR}/TESTS/bug_142.f
${arpack_SOURCE_DIR}/TESTS/bug_142_gen.f
${arpack_SOURCE_DIR}/TESTS/bug_58_double.f
${arpack_SOURCE_DIR}/TESTS/bug_79_double_complex.f
${arpack_SOURCE_DIR}/TESTS/dnsimp.f
${arpack_SOURCE_DIR}/TESTS/mmio.f
${arpack_SOURCE_DIR}/TESTS/bug_1315_single.c
${arpack_SOURCE_DIR}/TESTS/bug_1315_double.c
${arpack_SOURCE_DIR}/TESTS/icb_arpack_c.c
${arpack_SOURCE_DIR}/TESTS/icb_arpack_cpp.cpp
)
file(GLOB_RECURSE arpack_EX_F_SRC "${arpack_SOURCE_DIR}/EXAMPLES/*/*.f")
set(arpack_EX_CPP_SRC ${arpack_SOURCE_DIR}/EXAMPLES/MATRIX_MARKET/arpackmm.cpp)

set(parpack_TST_SRC
${arpack_SOURCE_DIR}/PARPACK/TESTS/MPI/issue46.f
${arpack_SOURCE_DIR}/PARPACK/TESTS/MPI/icb_parpack_c.c
${arpack_SOURCE_DIR}/PARPACK/TESTS/MPI/icb_parpack_cpp.cpp
)
file(GLOB_RECURSE parpack_EX_F_SRC "${arpack_SOURCE_DIR}/PARPACK/EXAMPLES/MPI/*.f")

# Create the coveralls target.
# Also lists the c/cpp files for test purposes
coveralls_setup(
"${arpacksrc_STAT_SRCS} ${arpackutil_STAT_SRCS} ${arpacksrc_ICB} ${arpack_TST_SRC} ${arpack_EX_F_SRC} ${arpack_EX_CPP_SRC} ${parpacksrc_STAT_SRCS} ${parpackutil_STAT_SRCS} ${parpacksrc_ICB} ${parpack_TST_SRC} ${parpack_EX_F_SRC}" # The source files.
ON # If we should upload.
"${PROJECT_SOURCE_DIR}/cmake/") # (Optional) Alternate project cmake module path.
endif()

function(libsummary title include libraries)
message(" -- ${title}:")
foreach(inc ${include})
Expand Down
128 changes: 0 additions & 128 deletions cmake/Coveralls.cmake

This file was deleted.

Loading

0 comments on commit 7e85cb1

Please sign in to comment.