Skip to content

Commit

Permalink
Refactor www build
Browse files Browse the repository at this point in the history
  • Loading branch information
kiron1 committed Jan 7, 2025
1 parent e70b856 commit 0c4232d
Show file tree
Hide file tree
Showing 8 changed files with 3,201 additions and 83 deletions.
53 changes: 34 additions & 19 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
branches:
- main
tags:
- 'v*'
- "v*"
pull_request:
branches:
- main
Expand All @@ -31,12 +31,10 @@ jobs:
fetch-depth: 1
- name: Version
id: version
run: |
./tools/version | tee -a "${GITHUB_OUTPUT}"
run: ./tools/version | tee -a "${GITHUB_OUTPUT}"
- name: Rev
id: rev
run: |
printf 'rev=%s\n' "$(git rev-parse --short HEAD)" | tee -a "${GITHUB_OUTPUT}"
run: printf 'rev=%s\n' "$(git rev-parse --short HEAD)" | tee -a "${GITHUB_OUTPUT}"

bazel_test:
name: Bazel test
Expand Down Expand Up @@ -102,20 +100,9 @@ jobs:
${{ matrix.buildflags }}
--
//...
shell: cmd
if: runner.os == 'Windows'
- name: Run tests
run: >
bazel
test
--config=ci
--//:version=${{ needs.version.outputs.version }}
--//:rev=${{ needs.version.outputs.rev }}
${{ matrix.buildflags }}
--
//...
-//doc/...
-//www/...
${{ runner.os != 'macOS' && '-//macos/... -//pkg/macos/... -//proxydetox:proxydetoxcli' || '' }}
if: runner.os != 'Windows'
bazel_check:
name: Bazel check
Expand Down Expand Up @@ -156,6 +143,29 @@ jobs:
-//macos/...
-//pkg/macos/...
-//proxydetox:proxydetoxcli
-//doc/...
-//www/...
bazel_www:
name: Bazel www
runs-on: ubuntu-24.04

needs: version

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Linux dependency
run: sudo apt-get install libkrb5-dev
- name: Run build
run: bazel build --config=ci -- //www
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: www
path: bazel-bin/www/www.zip

bazel_build:
name: Package
Expand All @@ -164,6 +174,7 @@ jobs:
needs:
- bazel_test
- bazel_check
- bazel_www
- version

strategy:
Expand Down Expand Up @@ -324,8 +335,12 @@ jobs:
name: Success gate
if: always()
needs:
- bazel_build
- bazel_test
- bazel_check
- bazel_www
- cargo_build_and_test
- mkrelease
- version
runs-on: ubuntu-24.04
steps:
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: pages
on:
push:
branches:
- 'main'
- "main"
workflow_dispatch:

jobs:
Expand All @@ -13,11 +13,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install mdbook
run: |
curl -sSfLo mdbook.tar.gz https://github.com/rust-lang/mdBook/releases/download/v0.4.36/mdbook-v0.4.36-x86_64-unknown-linux-musl.tar.gz
tar xzf mdbook.tar.gz
./mdbook --version
- name: Build pages
run: |
MDBOOK=$(pwd)/mdbook make pages
Expand Down
Loading

0 comments on commit 0c4232d

Please sign in to comment.