Skip to content

Commit

Permalink
Merge pull request eclipse-score#2 from eclipse-score/lt_initial_cont…
Browse files Browse the repository at this point in the history
…ribution

init: initial content for the web page
  • Loading branch information
antonkri authored Nov 21, 2024
2 parents 58e0a7a + a0e84c6 commit d05cb3e
Show file tree
Hide file tree
Showing 32 changed files with 1,996 additions and 2 deletions.
Empty file added .bazelrc
Empty file.
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.4.0
21 changes: 21 additions & 0 deletions .github/actions/gitlint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Gitlint Action"
description: "An action to install and run Gitlint on PR commits"
inputs:
pr-number:
description: "Pull Request number used to fetch commits"
required: true
base-branch:
description: "Base branch to compare commits against (default: origin/main)"
default: "origin/main"
required: false
runs:
using: "docker"
image: "jorisroovers/gitlint:0.19.1"
entrypoint: /bin/sh
args:
- -c
- |
git config --global --add safe.directory /github/workspace && \
git fetch origin +refs/heads/main:refs/remotes/origin/main && \
git fetch origin +refs/pull/${{ inputs.pr-number }}/head && \
gitlint --commits origin/main..HEAD
17 changes: 17 additions & 0 deletions .github/workflows/copyright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Copyright checks
on:
pull_request:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]
jobs:
copyright-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Setup Bazel
uses: bazel-contrib/[email protected]
- name: Run copyright checks
run: |
bazel run //:copyright.check
60 changes: 60 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Documentation build
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
merge_group:
types: [checks_requested]
jobs:
docs-build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Setup Bazel
uses: bazel-contrib/[email protected]
- name: Build documentation
run: |
bazel build //docs:github-pages && cp bazel-bin/docs/github-pages.tar .
- name: Upload artifact for deployment
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/[email protected]
with:
name: github-pages
path: ${{ github.workspace }}/github-pages.tar
retention-days: 1
if-no-files-found: error
- name: Upload artifact for pull request link
if: github.event_name == 'pull_request'
id: upload-artifact-pr
uses: actions/[email protected]
with:
name: github-pages-${{ github.sha }}
path: ${{ github.workspace }}/github-pages.tar
retention-days: 1
if-no-files-found: error
- name: Comment artifact URL
if: github.event_name == 'pull_request'
run: |
gh pr comment ${{ github.event.pull_request.number }} \
--body "Documentation artifact: ${{ steps.upload-artifact-pr.outputs.artifact-url }}"
env:
GH_TOKEN: ${{ github.token }}
docs-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: docs-build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]
17 changes: 17 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Formatting checks
on:
pull_request:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]
jobs:
formatting-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Setup Bazel
uses: bazel-contrib/[email protected]
- name: Run formatting checks
run: |
bazel test //:format.check
19 changes: 19 additions & 0 deletions .github/workflows/gitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Gitlint check
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint-commits:
name: check-commit-messages
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run Gitlint Action
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/actions/gitlint
with:
pr-number: ${{ github.event.number }}
base-branch: ${{ github.event.pull_request.base.ref }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Bazel
bazel-*
MODULE.bazel.lock

# Ruff
.ruff_cache
42 changes: 42 additions & 0 deletions .gitlint
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Available rules:
#
# T1: title-max-length
# T2: title-trailing-whitespace
# T3: title-trailing-punctuation (disabled)
# T4: title-hard-tab
# T5: title-must-not-contain-word (disabled)
# T6: title-leading-whitespace
# T7: title-match-regex (disabled)
# B1: body-max-line-length
# B2: body-trailing-whitespace
# B3: body-hard-tab
# B4: body-first-line-empty
# B5: body-min-length (disabled)
# B6: body-is-missing (disabled)
# B7: body-changed-file-mention (disabled)
#
# See http://jorisroovers.github.io/gitlint/rules/ for a full description.

# Ignore some default rules and enable regex style searching
[general]
ignore=T3,T5,B1,B5,B7
regex-style-search=true

# Maximum length of the title
[title-max-length]
line-length=72

[title-match-regex]
regex=^[a-z_-]+: .+$

# First line of the commit message body must be empty. (second line of the commit message)
[body-first-line-empty]

# Body must contain a reference to an issue
# 'see' will act as a form of reference from commits to issues without closing them.
[body-match-regex]
regex=Issue-ref: (see|close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) #(\d+)

#Ignores the title if it starts with Revert or Merge
[ignore-by-title]
regex=(^Revert |^Merge )
48 changes: 48 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# *******************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

test_suite(
name = "format.check",
tests = ["//tools/format:format.check"],
)

alias(
name = "format.fix",
actual = "//tools/format:format.fix",
)

alias(
name = "copyright.check",
actual = "//tools/cr_checker:copyright.check",
)

alias(
name = "copyright.fix",
actual = "//tools/cr_checker:copyright.fix",
)

filegroup(
name = "repo_directories",
srcs = [
"docs",
"tools",
],
visibility = [
"//tools/cr_checker:__subpackages__",
],
)

exports_files([
"MODULE.bazel",
"BUILD",
])
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2024 Contributors to the Eclipse Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
56 changes: 56 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
module(
name = "score_platform",
version = "0.1",
compatibility_level = 0,
)

###############################################################################
#
# Python version
#
###############################################################################
bazel_dep(name = "rules_python", version = "0.37.2")

PYTHON_VERSION = "3.12"

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = PYTHON_VERSION,
)
use_repo(python)

###############################################################################
#
# pip dependencies
#
###############################################################################
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pip_sphinx",
python_version = PYTHON_VERSION,
requirements_lock = "//docs:requirements_lock.txt",
)
use_repo(pip, "pip_sphinx")

###############################################################################
#
# Packaging dependencies
#
###############################################################################
bazel_dep(name = "rules_pkg", version = "1.0.1")

###############################################################################
#
# Buildifier dependency
# Provides formatting and linting of Bazel files.
#
###############################################################################
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1")

###############################################################################
#
# Generic linting and formatting rules
#
###############################################################################
bazel_dep(name = "aspect_rules_lint", version = "1.0.3")
35 changes: 35 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Notices for Eclipse Score

This content is produced and maintained by the Eclipse Score project.

* Project home: https://projects.eclipse.org/projects/automotive.score

## Trademarks

Eclipse Score and Score are trademarks of the Eclipse Foundation.
Eclipse, and the Eclipse Logo are registered trademarks of
the Eclipse Foundation.

## Copyright

All content is the property of the respective authors or their employers.
For more information regarding authorship of content, please consult the
listed source code repository logs.

## Declared Project Licenses

This program and the accompanying materials are made available under the terms
of the Apache License Version 2.0 which is available at
https://www.apache.org/licenses/LICENSE-2.0.

SPDX-License-Identifier: Apache-2.0

## Source Code

The project maintains the following source code repositories:

* TBD

## Third party Content

TBD
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# eclipse-score.github.io
The landing page website for the Score project
# Score landing page

## Building

### Supported environment
The build currently supports Linux environments.

### Use bazelisk for bazel version management
Follow [instructions](https://github.com/bazelbuild/bazelisk) and setup bazelisk to manage your bazel version based on the .bazelversion file.

### Check and fix formatting
```
$ bazel test //:format.check
$ bazel run //:format.fix
```

## Documentation

Use //docs:docs target to build the documentation.
```
$ bazel build //docs:docs
```

The output directory can be found under ```bazel-bin/docs/docs/_build/html```.

If you need to update pip dependencies, after modifying the requirements file, regenerate the lock file:
```
bazel run //docs:requirements.update
```
Loading

0 comments on commit d05cb3e

Please sign in to comment.