Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
boomanaiden154 committed Dec 31, 2024
1 parent 1a6a4d4 commit 7ac552a
Showing 1 changed file with 3 additions and 116 deletions.
119 changes: 3 additions & 116 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,122 +27,9 @@ on:
pull_request:

jobs:
check-python-formatting:
name: Python Formatting Check
runs-on: ubuntu-latest
debugging:
name: Debugging
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install pyink
run: pip3 install pyink==23.9.1
- name: Check python formatting
run: pyink --check --diff .
check-cpp-formatting:
name: C++ Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check c++ formatting
uses: jidicula/[email protected]
with:
clang-format-version: '18'
check-path: 'src'
check-bazel-formatting:
name: Bazel Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: thompsonja/[email protected]
with:
buildifier_version: v6.1.2
check-cmake-projects:
name: Check CMake-based projects
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hendrikmuhs/[email protected]
- uses: ConorMacBride/[email protected]
with:
apt: cmake ninja-build libpthreadpool-dev
- name: Get LLVM
run: |
git clone --depth 1 --no-checkout https://github.com/llvm/llvm-project.git /tmp/llvm-project
cd /tmp/llvm-project
git fetch --depth 1 origin $LLVM_COMMIT
git checkout $LLVM_COMMIT
- name: Set up TFLite
run: |
mkdir /tmp/tflite
cd /tmp/tflite
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export CMAKE_C_COMPILER_LAUNCHER=ccache
curl https://raw.githubusercontent.com/google/ml-compiler-opt/main/buildbot/build_tflite.sh | bash
- name: cmake setup
run: |
mkdir /tmp/cmake-build
cd /tmp/cmake-build
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
-DLLVM_TARGETS_TO_BUILD=Native \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-C /tmp/tflite/tflite.cmake \
/tmp/llvm-project/llvm \
-DLLVM_EXTERNAL_PROJECTS=gematria \
-DLLVM_EXTERNAL_GEMATRIA_SOURCE_DIR=${{ github.workspace }}
- name: build
run: |
cd /tmp/cmake-build
ninja llvm-granite check-llvm-tools-llvm-cm
check-bazel:
name: Run bazel build
runs-on: ubuntu-latest
env:
USE_BAZEL_VERSION: 6.4.0
strategy:
matrix:
build-config: [fastbuild, opt]
steps:
- uses: actions/checkout@v4
- name: Setup environment variables
run: echo "CURRENT_DAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Debugging
run: cat /proc/cpuinfo | grep MHz
- name: Setup LLVM
# TODO(boomanaiden154): We should refactor the docker image so we can
# have a base image with just system dependencies that we can then run
# everything in here to keep things consistent with less hacks.
run: |
sudo apt-get autoremove gcc-12 g++-12 && \
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main\ndeb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main" | sudo tee /etc/apt/sources.list && \
curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && \
curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
sudo apt-get update && \
sudo apt-get install -y clang-19 lld-19 && \
sudo rm -f /usr/bin/clang && \
sudo rm -f /usr/bin/clang++ && \
sudo ln -s /usr/bin/clang-19 /usr/bin/clang && \
sudo ln -s /usr/bin/clang-19 /usr/bin/clang++
- name: Cache Bazel
uses: actions/cache@v3
with:
path: |
~/.cache/bazel
key: ${{ runner.os }}-bazel-${{ matrix.build-config }}-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel') }}-${{ env.CURRENT_DAY }}
restore-keys: |
${{ runner.os }}-bazel-${{ matrix.build-config }}-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel') }}
${{ runner.os }}-bazel-${{ matrix.build-config }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install python deps
run: pip3 install -r requirements.txt
- name: Run build
run: bazel build -c ${{ matrix.build-config }} ...
- name: Run tests
run: bazel test -c ${{ matrix.build-config }} --test_tag_filters="-perf_counters" --test_output=errors ...

0 comments on commit 7ac552a

Please sign in to comment.