From 4c6c62d0e02ae258f563dbbe3f45b40db6bdafe8 Mon Sep 17 00:00:00 2001 From: Theodore Chang Date: Mon, 7 Oct 2024 00:20:06 +0200 Subject: [PATCH] Minor update --- .github/workflows/dev-all.yml | 4 +-- .github/workflows/dev-daily.yml | 59 ++++++++++++++++++++++++++++++++ .github/workflows/docker-env.yml | 7 ++-- .github/workflows/docker.yml | 4 +-- .github/workflows/master-all.yml | 4 +-- CMakeLists.txt | 4 +-- Script/Rocky.CUDA.Dockerfile | 2 +- Script/Rocky.Dockerfile | 2 +- 8 files changed, 73 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/dev-daily.yml diff --git a/.github/workflows/dev-all.yml b/.github/workflows/dev-all.yml index 3f0018dc8..cb556cef1 100644 --- a/.github/workflows/dev-all.yml +++ b/.github/workflows/dev-all.yml @@ -10,9 +10,9 @@ env: IOMP: '' COVERAGE: '' jobs: - ubuntu-dev: + linux-dev: if: ${{ !contains(github.event.head_commit.message, '[skip.linux]') && !contains(github.event.head_commit.message, '[skip.all]') }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 timeout-minutes: 60 strategy: matrix: diff --git a/.github/workflows/dev-daily.yml b/.github/workflows/dev-daily.yml new file mode 100644 index 000000000..cbe13ef09 --- /dev/null +++ b/.github/workflows/dev-daily.yml @@ -0,0 +1,59 @@ +name: Daily +on: + schedule: + - cron: '0 5 * * *' + workflow_dispatch: +env: + SP_TIME: '' + ARTIFACT: '' +jobs: + linux-daily: + runs-on: ubuntu-24.04 + timeout-minutes: 60 + strategy: + matrix: + build: [ Debug ] + compiler: [ { c: gcc, cpp: g++, fortran: gfortran } ] + avx: [ OFF ] + vtk: [ OFF ] + mkl: [ OFF ] + steps: + - name: Clone + uses: actions/checkout@v4 + - name: Golang + uses: actions/setup-go@v5 + with: + cache: false + - name: Dependency + run: | + echo "SP_TIME=-$(date +''%y%m%d'')" >> $GITHUB_ENV + sudo apt-get update && sudo apt-get install libglvnd-dev dpkg-dev xz-utils + - name: Compile + run: | + go build Checker/updater.go + mkdir build && cd build + cmake -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} -DCMAKE_Fortran_COMPILER=${{ matrix.compiler.fortran }} -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DUSE_AVX2=${{ matrix.avx }} -DBUILD_MULTITHREAD=OFF -DCMAKE_INSTALL_PREFIX=dist .. + make install -j"$(nproc)" && make package + - name: Pack + run: | + cp updater build/dist/bin + file_name="suanPan-linux-debug-gcc-no-avx-openblas" + file_name+="${{ env.SP_TIME }}.tar.gz" + echo "ARTIFACT=$file_name" >> "$GITHUB_ENV" + tar czf $file_name -C build/dist . + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: ${{ env.ARTIFACT }} + path: ${{ env.ARTIFACT }} + - name: Test + run: | + export LD_LIBRARY_PATH=/home/runner/work/suanPan/suanPan/build/dist/lib + ./build/dist/bin/suanPan -v + - name: Upload + uses: Difegue/action-megacmd@master + with: + args: put ${{ env.ARTIFACT }} /suanPan + env: + USERNAME: ${{ secrets.USERNAME }} + PASSWORD: ${{ secrets.PASSWORD }} \ No newline at end of file diff --git a/.github/workflows/docker-env.yml b/.github/workflows/docker-env.yml index d2fad3450..5d30cfe6f 100644 --- a/.github/workflows/docker-env.yml +++ b/.github/workflows/docker-env.yml @@ -2,10 +2,11 @@ name: Docker Base Image on: schedule: - cron: '0 5 2 * *' + workflow_dispatch: jobs: - env-image: - runs-on: ubuntu-latest - timeout-minutes: 60 + ide-image: + runs-on: self-hosted + timeout-minutes: 240 steps: - name: Clone uses: actions/checkout@v4 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 17aabfc8e..7562cdcea 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,9 +3,9 @@ on: push: branches: [ dev ] jobs: - ubuntu-dev: + linux: if: ${{ !contains(github.event.head_commit.message, '[skip.all]') }} - runs-on: ubuntu-22.04 + runs-on: self-hosted timeout-minutes: 60 steps: - name: Clone diff --git a/.github/workflows/master-all.yml b/.github/workflows/master-all.yml index d55f9ce44..7a639d47c 100644 --- a/.github/workflows/master-all.yml +++ b/.github/workflows/master-all.yml @@ -8,8 +8,8 @@ env: SP_TIME: '' ARTIFACT: '' jobs: - ubuntu-master: - runs-on: ubuntu-22.04 + linux-master: + runs-on: ubuntu-24.04 timeout-minutes: 60 strategy: matrix: diff --git a/CMakeLists.txt b/CMakeLists.txt index a6bc8c10d..f66214987 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -393,10 +393,10 @@ endforeach () if (CMAKE_SYSTEM_NAME MATCHES "Linux") file(READ "/etc/os-release" DISTRO_INFO) - string(REGEX MATCH "fedora|ubuntu" DIST ${DISTRO_INFO}) + string(REGEX MATCH "fedora|ubuntu|debian" DIST ${DISTRO_INFO}) if (DIST OR BUILD_PACKAGE) - if ((DIST STREQUAL "ubuntu") OR (BUILD_PACKAGE MATCHES "DEB")) + if ((DIST STREQUAL "ubuntu") OR (DIST STREQUAL "debian") OR (BUILD_PACKAGE MATCHES "DEB")) message(STATUS "Build DEB Package For Distribution: ${DIST}") set(CPACK_GENERATOR "DEB") # set(CPACK_DEBIAN_PACKAGE_DEPENDS "libstdc++6 libglvnd0 libgfortran5 libgomp1") diff --git a/Script/Rocky.CUDA.Dockerfile b/Script/Rocky.CUDA.Dockerfile index 712061221..7857950e1 100644 --- a/Script/Rocky.CUDA.Dockerfile +++ b/Script/Rocky.CUDA.Dockerfile @@ -1,7 +1,7 @@ FROM tlcfem/suanpan-env-cuda:latest AS build RUN git clone -b dev --depth 1 https://github.com/TLCFEM/suanPan.git -RUN cd suanPan && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_MULTITHREAD=ON -DUSE_HDF5=ON -DUSE_VTK=ON -DUSE_MKL=ON -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DUSE_INTEL_OPENMP=OFF -DLINK_DYNAMIC_MKL=OFF -DCMAKE_INSTALL_PREFIX=suanPan-linux-mkl-vtk -DBUILD_PACKAGE=RPM .. +RUN cd suanPan && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_MULTITHREAD=ON -DUSE_HDF5=ON -DUSE_AVX2=OFF -DUSE_VTK=ON -DUSE_MKL=ON -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DUSE_INTEL_OPENMP=OFF -DLINK_DYNAMIC_MKL=OFF -DCMAKE_INSTALL_PREFIX=suanPan-linux-mkl-vtk -DBUILD_PACKAGE=RPM .. RUN cd suanPan/build && make install -j"$(nproc)" && make package RUN cd suanPan/build && cp suanPan*.rpm / && \ tar czf /suanPan-linux-mkl-vtk.tar.gz suanPan-linux-mkl-vtk && \ diff --git a/Script/Rocky.Dockerfile b/Script/Rocky.Dockerfile index e7139198e..a7906a175 100644 --- a/Script/Rocky.Dockerfile +++ b/Script/Rocky.Dockerfile @@ -1,7 +1,7 @@ FROM tlcfem/suanpan-env:latest AS build RUN git clone -b dev --depth 1 https://github.com/TLCFEM/suanPan.git -RUN cd suanPan && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_MULTITHREAD=ON -DUSE_HDF5=ON -DUSE_VTK=ON -DUSE_MKL=ON -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DUSE_INTEL_OPENMP=OFF -DLINK_DYNAMIC_MKL=OFF -DCMAKE_INSTALL_PREFIX=suanPan-linux-mkl-vtk -DBUILD_PACKAGE=RPM .. +RUN cd suanPan && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_MULTITHREAD=ON -DUSE_HDF5=ON -DUSE_VTK=ON -DUSE_AVX2=OFF -DUSE_MKL=ON -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DUSE_INTEL_OPENMP=OFF -DLINK_DYNAMIC_MKL=OFF -DCMAKE_INSTALL_PREFIX=suanPan-linux-mkl-vtk -DBUILD_PACKAGE=RPM .. RUN cd suanPan/build && make install -j"$(nproc)" && make package RUN cd suanPan/build && cp suanPan*.rpm / && \ tar czf /suanPan-linux-mkl-vtk.tar.gz suanPan-linux-mkl-vtk && \