From 4aae2af87ce6b5778917e52db626fb6af7d93b20 Mon Sep 17 00:00:00 2001 From: Junpei Kawamoto Date: Thu, 30 May 2024 00:07:55 -0600 Subject: [PATCH] linux test --- .github/workflows/build.yaml | 118 ++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 58 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 16266e3..8569906 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,80 +10,82 @@ env: CXXFLAGS: "-std=c++17" jobs: - build-macos: - strategy: - fail-fast: false - matrix: - os: [ macos-13, macos-14 ] - backends: [ ruy, openblas, accelerate ] - openmp: [ "", openmp ] - exclude: - - os: macos-13 - backends: openblas - openmp: "" - - os: macos-14 - backends: openblas - openmp: "" - runs-on: ${{ matrix.os }} - - steps: - - name: Install OpenBLAS - if: ${{ matrix.backends == 'openblas' }} - run: | - brew install openblas - PREFIX=$(brew --prefix openblas) - echo "LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV - echo "CMAKE_PREFIX_PATH=$PREFIX:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV - - name: Install OpenMP - if: ${{ matrix.openmp == 'openmp' }} - run: | - brew install libomp - PREFIX=$(brew --prefix libomp) - echo "LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV - echo "CMAKE_PREFIX_PATH=$PREFIX:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: dtolnay/rust-toolchain@stable - - uses: Swatinem/rust-cache@v2 - - name: Build - run: cargo build -vv --no-default-features -F "${{ matrix.backends }} ${{ matrix.openmp }}" - - name: Run tests - run: cargo test -vv --no-default-features -F "${{ matrix.backends }} ${{ matrix.openmp }}" - -# build-linux: +# build-macos: # strategy: # fail-fast: false # matrix: -# feature: [ ruy, mkl, openblas ] -# runs-on: ubuntu-latest +# os: [ macos-13, macos-14 ] +# backends: [ ruy, openblas, accelerate ] +# openmp: [ "", openmp ] +# exclude: +# - os: macos-13 +# backends: openblas +# - os: macos-14 +# backends: openblas +# openmp: "" +# runs-on: ${{ matrix.os }} # # steps: -# - name: Install MKL -# if: ${{ matrix.feature == 'mkl' }} -# run: | -# wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB -# sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB -# sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' -# sudo apt-get update -# sudo apt-get install -y intel-mkl-64bit-2020.4-912 # - name: Install OpenBLAS -# if: ${{ matrix.feature == 'openblas' }} +# if: ${{ matrix.backends == 'openblas' }} # run: | -# sudo apt-get update -# sudo apt-get install -y cmake libclang-dev libopenblas-dev +# brew install openblas +# PREFIX=$(brew --prefix openblas) +# echo "LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV +# echo "CMAKE_PREFIX_PATH=$PREFIX:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV +# - name: Install OpenMP +# if: ${{ matrix.openmp == 'openmp' }} +# run: | +# brew install libomp +# PREFIX=$(brew --prefix libomp) +# echo "LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH" >> $GITHUB_ENV +# echo "CMAKE_PREFIX_PATH=$PREFIX:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV # - uses: actions/checkout@v4 # with: # submodules: recursive # - uses: dtolnay/rust-toolchain@stable # - uses: Swatinem/rust-cache@v2 # - name: Build -# run: cargo build -vv --no-default-features -F "${{ matrix.feature }}" +# run: cargo build -vv --no-default-features -F "${{ matrix.backends }} ${{ matrix.openmp }}" +# - name: Run tests +# run: cargo test -vv --no-default-features -F "${{ matrix.backends }} ${{ matrix.openmp }}" + + build-linux: + strategy: + fail-fast: false + matrix: + feature: [ ruy, mkl, openblas ] + runs-on: ubuntu-latest + env: + LIBRARY_PATH: /usr/lib/x86_64-linux-gnu + + steps: + - name: Install MKL + if: ${{ matrix.feature == 'mkl' }} + run: | + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB + sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' + sudo apt-get update + sudo apt-get install -y intel-mkl-64bit-2020.4-912 + pkg-config intel-mkl-64bit-2020.4-912 + - name: Install OpenBLAS + if: ${{ matrix.feature == 'openblas' }} + run: | + sudo apt-get update + sudo apt-get install -y cmake libclang-dev libopenblas-dev + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - name: Build + run: cargo build -vv --no-default-features -F "${{ matrix.feature }}" # env: # LIBRARY_PATH: /usr/lib/x86_64-linux-gnu # CXXFLAGS: -std=c++17 -# - name: Run tests -# run: cargo test -vv --no-default-features -F "${{ matrix.feature }}" + - name: Run tests + run: cargo test -vv --no-default-features -F "${{ matrix.feature }}" # env: # LIBRARY_PATH: /usr/lib/x86_64-linux-gnu # LD_LIBRARY_PATH: /opt/intel/lib/intel64