docs: update documentation #51
This file contains 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: dlinear CI | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- "dlinear/**" | |
- "tools/**" | |
- "third_party/**" | |
- "test/**" | |
pull_request: | |
branches: [ main ] | |
paths: | |
- "dlinear/**" | |
- "tools/**" | |
- "third_party/**" | |
- "test/**" | |
env: | |
PACKAGES: 'python3 build-essential automake libtool flex bison' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.PACKAGES }} | |
version: 1.0 | |
- name: Cache Bazel | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/bazel | |
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel') }} | |
restore-keys: | | |
${{ runner.os }}-bazel- | |
- name: Build | |
run: bazel build //dlinear | |
lint: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.PACKAGES }} | |
version: 1.0 | |
- name: Cache Bazel | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/bazel | |
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel') }} | |
restore-keys: | | |
${{ runner.os }}-bazel- | |
- name: Lint | |
run: bazel test --test_tag_filters=cpplint //dlinear/... | |
dwyu: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.PACKAGES }} | |
version: 1.0 | |
- name: Cache Bazel | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/bazel | |
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel') }} | |
restore-keys: | | |
${{ runner.os }}-bazel- | |
- name: dwyu | |
run: bazel build --config=dwyu //dlinear | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: ${{ env.PACKAGES }} | |
version: 1.0 | |
- name: Cache Bazel | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/bazel | |
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel') }} | |
restore-keys: | | |
${{ runner.os }}-bazel- | |
- name: Test | |
run: bazel test --test_tag_filters=dlinear //test/... |