ci: add a github action ci to test Rust std::autodiff #8002
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Enzyme CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| merge_group: | |
| jobs: | |
| build-linux: | |
| name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| llvm: ["15", "16"] | |
| build: ["Release", "Debug"] # "RelWithDebInfo" | |
| os: [ubuntu-22.04] | |
| timeout-minutes: 30 | |
| steps: | |
| - name: add llvm | |
| run: | | |
| wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - | |
| sudo apt-add-repository "deb http://apt.llvm.org/`lsb_release -c | cut -f2`/ llvm-toolchain-`lsb_release -c | cut -f2`-${{ matrix.llvm }} main" || true | |
| sudo apt-get install -y cmake gcc g++ llvm-${{ matrix.llvm }}-dev libzstd-dev | |
| sudo python3 -m pip install --upgrade pip lit | |
| - uses: actions/checkout@v4 | |
| - name: mkdir | |
| run: rm -rf build && mkdir build | |
| - name: cmake | |
| working-directory: build | |
| run: cmake ../enzyme -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm | |
| - name: make | |
| working-directory: build | |
| run: make -j `nproc` | |
| - name: make check-typeanalysis | |
| working-directory: build | |
| run: make -j `nproc` check-typeanalysis | |
| - name: make check-activityanalysis | |
| working-directory: build | |
| run: make -j `nproc` check-activityanalysis | |
| - name: make check-enzyme | |
| working-directory: build | |
| run: make -j `nproc` check-enzyme-bench | |
| build-macos: | |
| name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} macOS | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| llvm: ["15", "16"] | |
| build: ["Release", "Debug"] # "RelWithDebInfo" | |
| timeout-minutes: 30 | |
| steps: | |
| - name: add llvm | |
| run: | | |
| brew update | |
| brew uninstall cmake | |
| brew install llvm@${{ matrix.llvm }} make cmake | |
| sudo python3 -m pip install --upgrade --break-system-packages --user pip lit requests | |
| - uses: actions/checkout@v4 | |
| - name: mkdir | |
| run: rm -rf build && mkdir build | |
| - name: cmake | |
| working-directory: build | |
| run: cmake ../enzyme -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`find /Users/runner/Library/Python/ -iname lit` -DLLVM_DIR=`brew --prefix llvm@${{ matrix.llvm }}`/lib/cmake/llvm | |
| - name: make | |
| working-directory: build | |
| run: make -j 3 | |
| - name: make check-typeanalysis | |
| working-directory: build | |
| run: make -j 3 check-typeanalysis | |
| - name: make check-activityanalysis | |
| working-directory: build | |
| run: make -j 3 check-activityanalysis | |
| - name: make check-enzyme | |
| working-directory: build | |
| run: make -j3 check-enzyme-bench | |
| build-xcode: | |
| name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} macOS XCode | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| llvm: ["16"] | |
| build: ["Release"] # "RelWithDebInfo" | |
| timeout-minutes: 30 | |
| steps: | |
| - name: add llvm | |
| run: | | |
| brew uninstall cmake | |
| brew install llvm@${{ matrix.llvm }} make cmake gcc | |
| sudo python3 -m pip install --upgrade --break-system-packages --user pip lit | |
| - uses: actions/checkout@v4 | |
| - name: mkdir | |
| run: rm -rf build && mkdir build | |
| - name: cmake | |
| working-directory: build | |
| run: | | |
| cmake ../enzyme -GXcode -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=`brew --prefix llvm@${{ matrix.llvm }}`/lib/cmake/llvm | |
| cmake --build . --parallel 3 |