Skip to content

Commit

Permalink
Mark JAX git repository as safe in the asan workflow
Browse files Browse the repository at this point in the history
We are not able to run `git` commands without it

PiperOrigin-RevId: 700336969
  • Loading branch information
nitins17 authored and Google-ML-Automation committed Nov 26, 2024
1 parent dc11d40 commit 356d842
Showing 1 changed file with 32 additions and 31 deletions.
63 changes: 32 additions & 31 deletions .github/workflows/asan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,43 +28,44 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: jax
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: python/cpython
path: cpython
ref: v3.13.0
- name: Install clang 18
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt update
apt install -y clang-18 libstdc++-14-dev build-essential libssl-dev \
zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl git \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
libffi-dev liblzma-dev
- name: Build CPython with ASAN enabled
env:
ASAN_OPTIONS: detect_leaks=0
run: |
cd cpython
mkdir ${GITHUB_WORKSPACE}/cpythonasan
CC=clang-18 CXX=clang++-18 ./configure --prefix ${GITHUB_WORKSPACE}/cpythonasan --with-address-sanitizer --without-pymalloc
make -j64
make install
${GITHUB_WORKSPACE}/cpythonasan/bin/python3 -m venv ${GITHUB_WORKSPACE}/venv
- name: Install JAX test requirements
env:
ASAN_OPTIONS: detect_leaks=0
run: |
source ${GITHUB_WORKSPACE}/venv/bin/activate
cd jax
pip install -r build/test-requirements.txt
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# with:
# repository: python/cpython
# path: cpython
# ref: v3.13.0
# - name: Install clang 18
# env:
# DEBIAN_FRONTEND: noninteractive
# run: |
# apt update
# apt install -y clang-18 libstdc++-14-dev build-essential libssl-dev \
# zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl git \
# libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
# libffi-dev liblzma-dev
# - name: Build CPython with ASAN enabled
# env:
# ASAN_OPTIONS: detect_leaks=0
# run: |
# cd cpython
# mkdir ${GITHUB_WORKSPACE}/cpythonasan
# CC=clang-18 CXX=clang++-18 ./configure --prefix ${GITHUB_WORKSPACE}/cpythonasan --with-address-sanitizer --without-pymalloc
# make -j64
# make install
# ${GITHUB_WORKSPACE}/cpythonasan/bin/python3 -m venv ${GITHUB_WORKSPACE}/venv
# - name: Install JAX test requirements
# env:
# ASAN_OPTIONS: detect_leaks=0
# run: |
# source ${GITHUB_WORKSPACE}/venv/bin/activate
# cd jax
# pip install -r build/test-requirements.txt
- name: Build and install JAX
env:
ASAN_OPTIONS: detect_leaks=0
run: |
source ${GITHUB_WORKSPACE}/venv/bin/activate
cd jax
git config --global --add safe.directory jax
python build/build.py build --wheels=jaxlib --verbose \
--bazel_options=--color=yes \
--bazel_options=--copt=-fsanitize=address \
Expand Down

0 comments on commit 356d842

Please sign in to comment.