Skip to content
5 changes: 4 additions & 1 deletion .github/workflows/bcload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ jobs:
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 clang-${{ matrix.llvm }} libclang-${{ matrix.llvm }}-dev
sudo python3 -m pip install --upgrade pip lit
- uses: actions/checkout@v4
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: mkdir
run: cd enzyme && rm -rf build && mkdir build
- name: cmake
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ jobs:
apt-get --allow-unauthenticated install -y python3-pip autoconf cmake gcc g++ libtool gfortran libblas-dev llvm-${{ matrix.llvm }}-dev clang-${{ matrix.llvm }} libeigen3-dev libboost-dev libzstd-dev
python3 -m pip install lit pathlib --break-system-packages
touch /usr/lib/llvm-${{ matrix.llvm }}/bin/yaml-bench
- uses: actions/checkout@v4
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: mkdir
run: rm -rf build && mkdir build
- name: cmake
Expand Down
41 changes: 28 additions & 13 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ jobs:
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 libomp-${{ matrix.llvm }}-dev lld-${{ matrix.llvm }} clang-${{ matrix.llvm }} libclang-${{ matrix.llvm }}-dev libeigen3-dev libboost-dev libzstd-dev
sudo python3 -m pip install --upgrade pip lit
- uses: actions/checkout@v4
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: mkdir
run: rm -rf build && mkdir build
- name: cmake
Expand All @@ -51,16 +54,28 @@ jobs:
- name: make check-enzyme-integration
working-directory: build
run: make -j `nproc` check-enzyme-integration

- name: Update Nightly Release
uses: ncipollo/release-action@v1
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
with:
tag: nightly
name: Nightly Release
body: "Latest nightly build of Enzyme."
artifacts: "build/Enzyme/LLVMEnzyme-${{ matrix.llvm }}*,build/Enzyme/ClangEnzyme-${{ matrix.llvm }}*,build/Enzyme/LLDEnzyme-${{ matrix.llvm }}*"
allowUpdates: true
removeArtifacts: false
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if gh release view nightly >/dev/null 2>&1; then
gh release edit nightly --title "Nightly Release" --notes "Latest nightly build of Enzyme."
else
gh release create nightly --title "Nightly Release" --notes "Latest nightly build of Enzyme."
fi
artifacts=()
for pattern in \
build/Enzyme/LLVMEnzyme-${{ matrix.llvm }}* \
build/Enzyme/ClangEnzyme-${{ matrix.llvm }}* \
build/Enzyme/LLDEnzyme-${{ matrix.llvm }}*; do
for artifact in $pattern; do
[ -e "$artifact" ] && artifacts+=("$artifact")
done
done
if [ ${#artifacts[@]} -gt 0 ]; then
gh release upload nightly "${artifacts[@]}" --clobber
else
echo "No nightly artifacts found for LLVM ${{ matrix.llvm }}."
fi
13 changes: 8 additions & 5 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- uses: mattnotmitt/doxygen-action@v1.12.0
- uses: mattnotmitt/doxygen-action@b84fe17600245bb5db3d6c247cc274ea98c15a3b # v1.12.0
with:
working-directory: 'enzyme/'
doxyfile-path: 'doxygen.cfg'

- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
with:
path: enzyme/doxygen/html

deploy-docs:
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
Expand All @@ -38,4 +41,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 #v5
28 changes: 13 additions & 15 deletions .github/workflows/enzyme-bazel.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Bazel

on:
schedule:
- cron: 0 0 * * *
push:
branches:
- main
- main
paths:
- '.github/workflows/enzyme-bazel.yml'
- 'enzyme/Enzyme/**'
Expand All @@ -16,7 +14,7 @@ on:
- 'enzyme/WORKSPACE'
pull_request:
branches:
- main
- main
paths:
- '.github/workflows/enzyme-bazel.yml'
- 'enzyme/Enzyme/**'
Expand All @@ -28,8 +26,6 @@ on:
merge_group:

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

Expand All @@ -40,32 +36,34 @@ jobs:
strategy:
fail-fast: false
matrix:
os:
- linux-x86-n2-32
build:
- Release
llbuild:
- Release
timeout-minutes: 500
timeout-minutes: 500

container:
image: ${{ (contains(matrix.os, 'linux') && 'ghcr.io/enzymead/reactant-docker-images@sha256:91e1edb7a7c869d5a70db06e417f22907be0e67ca86641d48adcea221fedc674' ) || '' }}
image: ghcr.io/enzymead/reactant-docker-images@sha256:91e1edb7a7c869d5a70db06e417f22907be0e67ca86641d48adcea221fedc674

steps:
- name: Install Python dependencies
run: python -m pip install lit
- uses: actions/checkout@v4
- uses: actions/checkout@v4
run: |
python3 -m ensurepip --upgrade || sudo apt-get install -y python3-pip
python3 -m pip install --upgrade pip
python3 -m pip install lit
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
repository: 'llvm/llvm-project'
path: 'llvm-project'
- uses: bazel-contrib/setup-bazel@0.14.0
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
name: Set up Bazel
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.build }}-${{ matrix.llbuild }}
# Share repository cache between workflows.
repository-cache: true
bazelisk-version: 1.x
- name: Build Enzyme
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/enzyme-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ jobs:
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: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: mkdir
run: rm -rf build && mkdir build
- name: cmake
Expand Down Expand Up @@ -71,7 +74,10 @@ jobs:
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: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: mkdir
run: rm -rf build && mkdir build
- name: cmake
Expand Down Expand Up @@ -107,7 +113,10 @@ jobs:
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: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: mkdir
run: rm -rf build && mkdir build
- name: cmake
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/enzyme-julia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ on:
- main
merge_group:

# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
Expand All @@ -24,6 +19,9 @@ jobs:
build:
name: Enzyme CI Julia ${{ matrix.version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
actions: write
contents: read
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
fail-fast: false
Expand All @@ -36,11 +34,16 @@ jobs:
- ubuntu-latest
arch:
- 'default'
timeout-minutes: 60
timeout-minutes: 60
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v5
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Checkout Enzyme.jl repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
repository: 'EnzymeAD/Enzyme.jl'
path: ./jl
ref: main
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/enzyme-mlir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ jobs:
apt-get update
apt-get install -y binutils ninja-build cmake gcc g++ python3 python3-dev

- uses: actions/checkout@v4
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
path: 'Enzyme'

- uses: actions/checkout@v4
- name: Checkout LLVM repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
repository: 'llvm/llvm-project'
ref: '084f6484d76625b995c07f512a323ab7cdc5351d'
path: 'llvm-project'
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/enzyme-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ jobs:
. ~/.cargo/env
rustup toolchain install nightly
rustup default nightly
- uses: actions/checkout@v5
name: Checkout Enzyme
- uses: actions/checkout@v5
name: Checkout Rust compiler
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Checkout Rust compiler
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
repository: rust-lang/rust
ref: ${{ matrix.commit }}
path: rust
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: DoozyX/clang-format-lint-action@v0.20
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: DoozyX/clang-format-lint-action@bcb4eb2cb0d707ee4f3e5cc3b456eb075f12cf73 # v0.20
with:
source: 'enzyme/Enzyme enzyme/tools/enzyme-tblgen'
exclude: './CMakeLists.txt enzyme/Enzyme/SCEV'
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/fortran.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ jobs:
sudo apt-add-repository "deb http://apt.llvm.org/`lsb_release -c | cut -f2`/ llvm-toolchain-`lsb_release -c | cut -f2`-${{ matrix.llvm }} main"
sudo apt-get update && sudo apt-get install -y cmake gcc g++ llvm-${{ matrix.llvm }}-dev ninja-build pip clang-${{ matrix.llvm }} flang-${{ matrix.llvm }}
sudo python3 -m pip install --upgrade pip lit
- uses: actions/checkout@v4
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: generate build system
run: |
rm -rf build && mkdir build && cd build
Expand Down Expand Up @@ -101,7 +104,10 @@ jobs:
sudo apt-get update && sudo apt-get install -y intel-oneapi-compiler-fortran-${{ matrix.versions.ifx }} intel-oneapi-mpi-${{ matrix.mpi }} intel-oneapi-mpi-devel-${{ matrix.mpi }}
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: generate build system
run: |
rm -rf build && mkdir build && cd build
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ jobs:
- os: linux-x86-a2-48-a100-4gpu
package: summit
steps:
- uses: actions/checkout@v7
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: add llvm
run: |
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /usr/share/keyrings/llvm-snapshot.gpg
apt-add-repository "deb http://apt.llvm.org/`lsb_release -c | cut -f2`/ llvm-toolchain-`lsb_release -c | cut -f2`-${{ matrix.llvm }} main" || true
apt-get install -y cmake gcc g++ clang-${{ matrix.llvm }} libclang-${{ matrix.llvm }}-dev llvm-${{ matrix.llvm }}-dev libzstd-dev
- uses: actions/checkout@v4
- name: mkdir
run: rm -rf build && mkdir build
- name: cmake
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ jobs:
emission-order:
name: Deterministic IR emission order
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Check for order-dependent IR emission
run: |
python3 enzyme/scripts/check_emission_order.py --github \
Expand All @@ -26,9 +28,25 @@ jobs:
llvm-api:
name: Direct use of wrapped LLVM APIs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Check for direct LLVM API calls that Utils.h wraps
run: |
python3 enzyme/scripts/check_llvm_api.py --github enzyme/Enzyme

zizmor:
name: GitHub Actions linting
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
security-events: write # We trust the zizmor action with write permissions
steps:
- name: Checkout Enzyme repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Run zizmor
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0
Loading
Loading