From e160a8f2c0f91d2f9e20631b1e46b35063bdcb1d Mon Sep 17 00:00:00 2001 From: "Yu-Hsiang M. Tsai" Date: Thu, 7 Nov 2024 13:56:27 +0100 Subject: [PATCH] try msys --- .github/workflows/bot-pr-comment.yml | 40 ------------ .github/workflows/bot-pr-created.yml | 17 ----- .github/workflows/bot-pr-updated.yml | 65 ------------------- .github/workflows/check-formatting.yml | 21 ------ .github/workflows/intel.yml | 52 --------------- .github/workflows/joss.yml | 37 ----------- .github/workflows/mirror.yml | 19 ------ .github/workflows/msys.yml | 90 ++++++++++++++++++++++++++ .github/workflows/osx.yml | 66 ------------------- .github/workflows/spell_check.yml | 16 ----- 10 files changed, 90 insertions(+), 333 deletions(-) delete mode 100644 .github/workflows/bot-pr-comment.yml delete mode 100644 .github/workflows/bot-pr-created.yml delete mode 100644 .github/workflows/bot-pr-updated.yml delete mode 100644 .github/workflows/check-formatting.yml delete mode 100644 .github/workflows/intel.yml delete mode 100644 .github/workflows/joss.yml delete mode 100644 .github/workflows/mirror.yml create mode 100644 .github/workflows/msys.yml delete mode 100644 .github/workflows/osx.yml delete mode 100644 .github/workflows/spell_check.yml diff --git a/.github/workflows/bot-pr-comment.yml b/.github/workflows/bot-pr-comment.yml deleted file mode 100644 index 6c66c9ad845..00000000000 --- a/.github/workflows/bot-pr-comment.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: OnCommentPR - -on: - issue_comment: - types: [created] - -jobs: - label: - runs-on: ubuntu-latest - if: github.event.issue.pull_request != '' && github.event.comment.body == 'label!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') - steps: - - name: Checkout the latest code (shallow clone) - uses: actions/checkout@v4 - with: - ref: develop - - name: Add appropriate labels - env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - run: cp --preserve .github/label.sh /tmp && /tmp/label.sh - - check_format: - name: check-format - if: github.event.issue.pull_request != '' && github.event.comment.body == 'check-format!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') - uses: ./.github/workflows/check-formatting.yml - secrets: inherit - - format: - name: format - runs-on: ubuntu-22.04 - if: github.event.issue.pull_request != '' && github.event.comment.body == 'format!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') - steps: - - name: Checkout the latest code (shallow clone) - uses: actions/checkout@v4 - with: - ref: develop - persist-credentials: false - - name: Commit formatting changes - env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - run: cp --preserve .github/format.sh /tmp && /tmp/format.sh diff --git a/.github/workflows/bot-pr-created.yml b/.github/workflows/bot-pr-created.yml deleted file mode 100644 index 21fb0b3ca14..00000000000 --- a/.github/workflows/bot-pr-created.yml +++ /dev/null @@ -1,17 +0,0 @@ -on: - pull_request_target: - types: [opened] -name: OnNewPR -jobs: - label: - runs-on: ubuntu-latest - if: github.event.pull_request.author_association == 'COLLABORATOR' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'OWNER' - steps: - - name: Checkout the latest code (shallow clone) - uses: actions/checkout@v4 - with: - ref: develop - - name: Add appropriate labels - env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - run: .github/label.sh diff --git a/.github/workflows/bot-pr-updated.yml b/.github/workflows/bot-pr-updated.yml deleted file mode 100644 index 17b3deaf9fa..00000000000 --- a/.github/workflows/bot-pr-updated.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: OnSyncPR - -on: - pull_request_target: - types: [opened,synchronize] - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} - cancel-in-progress: true - -jobs: - check-format: - if: github.event.pull_request.author_association == 'COLLABORATOR' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'OWNER' - uses: ./.github/workflows/check-formatting.yml - secrets: inherit - - abidiff: - runs-on: ubuntu-latest - if: github.event.pull_request.author_association == 'COLLABORATOR' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'OWNER' - env: - CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=DEBUG -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_BENCHMARKS=OFF -DGINKGO_BUILD_HWLOC=OFF -DGINKGO_BUILD_REFERENCE=OFF -DGINKGO_BUILD_OMP=OFF -DGINKGO_BUILD_CUDA=OFF -DGINKGO_BUILD_HIP=OFF -DGINKGO_BUILD_SYCL=OFF - steps: - - name: Checkout the new code (shallow clone) - uses: actions/checkout@v4 - with: - path: new - ref: ${{ github.event.pull_request.head.ref }} - - name: Checkout the old code (shallow clone) - uses: actions/checkout@v4 - with: - path: old - ref: ${{ github.event.pull_request.base.ref }} - - name: Install abidiff - run: sudo apt-get install abigail-tools - - name: Build both libraries - run: | - mkdir build-new - mkdir build-old - cmake -B build-new new ${{ env.CMAKE_FLAGS }} - cmake -B build-old old ${{ env.CMAKE_FLAGS }} - cmake --build build-new -j`nproc` - cmake --build build-old -j`nproc` - - name: Compute abidiff - env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - run: old/.github/abidiff.sh - - name: Upload ABI diff - if: failure() - uses: actions/upload-artifact@v3 - with: - name: abi - path: abi.diff - - check-wiki-changelog: - runs-on: ubuntu-latest - if: github.event.pull_request.author_association == 'COLLABORATOR' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'OWNER' - steps: - - name: Checkout the latest code (shallow clone) - uses: actions/checkout@v4 - with: - ref: develop - - name: Check if PR number exists in wiki/Changelog - env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - run: .github/check-wiki-changelog.sh diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml deleted file mode 100644 index a5af5a26d2a..00000000000 --- a/.github/workflows/check-formatting.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Check formatting -on: workflow_call - -jobs: - pre-commit: - name: Run pre-commit hooks - runs-on: ubuntu-22.04 - steps: - - name: Checkout the latest code (shallow clone) - uses: actions/checkout@v4 - - name: Run Pre-Commit checks - run: cp .github/check-format.sh /tmp && /tmp/check-format.sh - id: pre-commit - env: - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - - name: Upload code formatting patch - if: ${{ failure() }} - uses: actions/upload-artifact@v3 - with: - name: patch - path: format.patch diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml deleted file mode 100644 index 0aa435dfee3..00000000000 --- a/.github/workflows/intel.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Intel-build - -on: - push: - branches: - - 'master' - - 'develop' - - 'release/**' - tags: - - '**' - pull_request: - types: [opened,synchronize] - -concurrency: - group: ${{ github.workflow }}-${{ (github.head_ref && github.ref) || github.run_id }} - cancel-in-progress: true - -jobs: - intel: - strategy: - fail-fast: false - matrix: - config: - - {compiler: "dpcpp", build_type: "Release", name: "intel/dpcpp/release/shared", mixed: "ON"} - - {compiler: "icpx", build_type: "Release", name: "intel/icpx/release/shared", mixed: "OFF"} - name: ${{ matrix.config.name }} - runs-on: [gpu_intel] - - steps: - - name: Checkout the latest code (shallow clone) - uses: actions/checkout@v4 - - - name: configure - run: | - source /etc/profile - module load intel-oneapi-compilers intel-oneapi-dpl intel-oneapi-mkl cmake - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=install_ginkgo -DCMAKE_CXX_FLAGS="-Wpedantic -ffp-model=precise" -DCMAKE_CXX_COMPILER=${{ matrix.config.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_MIXED_PRECISION=${{ matrix.config.mixed }} -DGINKGO_BUILD_CUDA=OFF -DGINKGO_BUILD_HIP=OFF -DGINKGO_BUILD_MPI=OFF -DGINKGO_DPCPP_SINGLE_MODE=ON - make -j8 - ONEAPI_DEVICE_SELECTOR=level_zero:gpu ctest -j10 --output-on-failure - - - name: install - run: | - source /etc/profile - module load intel-oneapi-compilers intel-oneapi-dpl intel-oneapi-mkl cmake - cd build - SYCL_DEVICE_FILTER=level_zero:gpu make install - export GINKGO_PATH="$(pwd)/install_ginkgo/lib" - export LIBRARY_PATH=${ICL_INTEL_TBB_ROOT}/lib64:${GINKGO_PATH}:$LIBRARY_PATH - export LD_LIBRARY_PATH=${ICL_INTEL_TBB_ROOT}/lib64:${GINKGO_PATH}:$LD_LIBRARY_PATH - SYCL_DEVICE_FILTER=level_zero:gpu make test_install diff --git a/.github/workflows/joss.yml b/.github/workflows/joss.yml deleted file mode 100644 index 331e02b2467..00000000000 --- a/.github/workflows/joss.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: JOSS-build - -on: - push: - paths: - - 'doc/joss/**' - -jobs: - joss-generate: - name: joss-pandoc - runs-on: [ubuntu-latest] - - steps: - - name: Checkout the latest code (shallow clone) - uses: actions/checkout@v4 - - - name: setup - run: sudo apt-get install texlive-xetex pandoc pandoc-citeproc - - name: info - run: | - pandoc -v - - name: build - run: | - pushd . - mkdir build - cd build - mkdir doc - cd doc - cp -r ../../doc/joss ./ - cd joss - pandoc paper.md -o paper.pdf --bibliography ./paper.bib --pdf-engine=xelatex - popd - - uses: actions/upload-artifact@v1.0.0 - with: - name: joss-paper - path: build/doc/joss/paper.pdf - diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml deleted file mode 100644 index 43ebd4a2aae..00000000000 --- a/.github/workflows/mirror.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Mirroring -on: push - -jobs: - to_gitlab: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: develop - fetch-depth: 0 - persist-credentials: false - - name: Push to Gitlab - run: cp --preserve .github/mirror.sh /tmp && /tmp/mirror.sh - env: - BOT_KEY: ${{ secrets.GITLAB_MIRROR_PRIV_KEY }} - BRANCH_NAME: ${{ github.ref_name }} - GITHUB_REPO: ${{ github.repository }} diff --git a/.github/workflows/msys.yml b/.github/workflows/msys.yml new file mode 100644 index 00000000000..fd09348cf4a --- /dev/null +++ b/.github/workflows/msys.yml @@ -0,0 +1,90 @@ +name: msys + +on: + push: + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: [ + { msystem: MINGW64, runner: windows-2022 }, + { msystem: CLANG64, runner: windows-2022 }, + ] + name: ${{ matrix.msystem }} + runs-on: ${{ matrix.runner }} + steps: + - name: Get CPU Name + run : | + Get-CIMInstance -Class Win32_Processor | Select-Object -Property Name + - name: Setup JIT minidump + if: ${{ matrix.msystem != 'CLANGARM64' }} + run: | + Set-Location '${{ runner.temp }}' + Invoke-WebRequest -Uri 'https://download.sysinternals.com/files/Procdump.zip' -OutFile Procdump.zip + Expand-Archive Procdump.zip -DestinationPath . + New-Item -Path '_dumps' -ItemType Directory + .\procdump64.exe -accepteula -ma -i "${{ runner.temp }}/_dumps" + .\procdump.exe -accepteula -ma -i "${{ runner.temp }}/_dumps" + - name: Configure Pagefile + if: ${{ matrix.msystem != 'CLANGARM64' }} + # https://github.com/al-cheb/configure-pagefile-action/issues/16 + continue-on-error: true + uses: al-cheb/configure-pagefile-action@v1.4 + with: + minimum-size: 4GB + maximum-size: 16GB + disk-root: "C:" + + - name: Checkout the latest code (shallow clone) + uses: actions/checkout@v4 + with: + path: temp + + # to match the autobuild environment + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + architecture: 'x64' + + - uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.msystem }} + install: git python base-devel cmake ninja + update: true + release: ${{ runner.arch != 'ARM64' }} + location: 'D:\M' + + - name: Add staging repo + shell: msys2 {0} + run: | + cp /etc/pacman.conf /etc/pacman.conf.bak + grep -qFx '[staging]' /etc/pacman.conf || sed -i '/^# \[staging\]/,/^$/ s|^# ||g' /etc/pacman.conf + - name: Update using staging + run: | + msys2 -c 'pacman --noconfirm -Suuy' + msys2 -c 'pacman --noconfirm -Suu' + - name: Move Checkout + run: | + If (Test-Path "C:\_") { rm -r -fo "C:\_" } + Copy-Item -Path ".\temp" -Destination "C:\_" -Recurse + - name: CI-Build + shell: msys2 {0} + id: build + run: | + cd /C/_ + unset VCPKG_ROOT + mkdir build + cd build + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DGINKGO_BUILD_HWLOC=OFF -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_BENCHMARKS=OFF .. + + + - name: "Clean up runner" + if: ${{ always() }} + continue-on-error: true + run: | + If (Test-Path "C:\_") { rm -r -fo "C:\_" } + msys2 -c 'mv -f /etc/pacman.conf.bak /etc/pacman.conf' + msys2 -c 'pacman --noconfirm -Suuy' + msys2 -c 'pacman --noconfirm -Suu' \ No newline at end of file diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml deleted file mode 100644 index 441be04d842..00000000000 --- a/.github/workflows/osx.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: OSX-build - -on: - push: - branches: - - 'master' - - 'develop' - - 'release/**' - tags: - - '**' - pull_request: - types: [opened,synchronize] - workflow_dispatch: - inputs: - debug_enabled: - description: 'Run the build with tmate debugging enabled by `debug_enabled` keyword (https://github.com/marketplace/actions/debugging-with-tmate)' - required: false - default: false - -concurrency: - group: ${{ github.workflow }}-${{ (github.head_ref && github.ref) || github.run_id }} - cancel-in-progress: true - -jobs: - osx-clang-omp: - strategy: - fail-fast: false - matrix: - config: - - {shared: "ON", build_type: "Debug", name: "omp/debug/shared", "mixed": "OFF"} - - {shared: "OFF", build_type: "Release", name: "omp/release/static", "mixed": "ON"} - name: ${{ matrix.config.name }} - runs-on: [macos-latest] - - steps: - - name: Checkout the latest code (shallow clone) - uses: actions/checkout@v4 - - - name: setup - run: | - brew install libomp - - - name: info - run: | - g++ -v - cmake --version - - - name: Debug over SSH (tmate) - uses: mxschmitt/action-tmate@v3.5 - if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} - - - name: configure - run: | - mkdir build - mkdir install - export INSTALL_PREFIX=`pwd`/install - cd build - cmake .. -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp/ -DCMAKE_CXX_FLAGS=-Wpedantic -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_MIXED_PRECISION=${{ matrix.config.mixed }} - make -j8 - ctest -j10 --output-on-failure - - - name: install - run: | - cd build - make install - make test_install diff --git a/.github/workflows/spell_check.yml b/.github/workflows/spell_check.yml deleted file mode 100644 index 7369d3b42e3..00000000000 --- a/.github/workflows/spell_check.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Test GitHub Action -on: - pull_request: - types: [opened, synchronize] - -jobs: - run: - name: Spell Check with Typos - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Check for typos - uses: crate-ci/typos@master - with: - config: .github/_typos.toml -