Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a license check #20

Merged
merged 3 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright lowRISC Contributors.
# SPDX-License-Identifier: Apache-2.0

FROM ubuntu:22.04
ARG USERNAME=sonata
# Install nix, git and cmake (required to build sonata-system software,
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright lowRISC contributors.
#
# SPDX-License-Identifier: MIT
# SPDX-License-Identifier: Apache-2.0

name: CI

Expand Down Expand Up @@ -31,5 +30,11 @@ jobs:
- name: Nix Format Check
run: nix fmt -- . --check

# This isn't part of the the nix flake checks
# because it can't ignore submodules
# when they are vendored in by Nix.
- name: Licence Check
run: nix run nixpkgs#reuse lint

- name: Run Nix Checks
run: nix flake check -L .?submodules=1
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Copyright lowRISC contributors.
# SPDX-License-Identifier: Apache-2.0

# xmake artifacts
build
.xmake

# clang tooling artifacts
compile_commands.json
.cache
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright lowRISC Contributors.
# SPDX-License-Identifier: Apache-2.0

[submodule "cheriot-rtos"]
path = cheriot-rtos
url = https://github.com/lowrisc/cheriot-rtos
Expand Down
19 changes: 19 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

Files: *.lock
README.md
**/README.md
hackathon.md
.devcontainer/*.*
scripts/rp2040_uf2/pgrm.bin
Copyright: lowRISC contributors
License: Apache-2.0

Files: .clang-tidy
compile_flags.txt
Copyright: Copyright Microsoft and CHERIoT Contributors
License: MIT

Files: scripts/rp2040_uf2/uf2families.json
Copyright: Microsoft Corporation
License: MIT
1 change: 1 addition & 0 deletions LICENSES/Apache-2.0.txt
9 changes: 9 additions & 0 deletions LICENSES/MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 changes: 16 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@
esac
'';
};
run-lints = pkgs.writeShellApplication {
name = "run-lints";
text = ''
${getExe pkgs.reuse} lint
${getExe clang-lint} check
'';
};
in {
formatter = pkgs.alejandra;
devShells = rec {
Expand All @@ -69,9 +76,15 @@
'';
};
};
apps.clang-lint = {
type = "app";
program = getExe clang-lint;
apps = {
run-lints = {
type = "app";
program = getExe run-lints;
};
clang-lint = {
type = "app";
program = getExe clang-lint;
};
};
checks = {
clang-checks = pkgs.stdenvNoCC.mkDerivation {
Expand Down
4 changes: 3 additions & 1 deletion scripts/rp2040_uf2/make_rp2040_uf2.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
#!/usr/bin/env sh
# Copyright lowRISC Contributors.
# SPDX-License-Identifier: Apache-2.0

program_filename=${1%.*}

Expand Down
4 changes: 4 additions & 0 deletions scripts/rp2040_uf2/uf2conv-ext.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env python3
# Copyright Microsoft Corporation
# Copyright lowRISC Contributors.
# SPDX-License-Identifier: Apache-2.0

import sys
import struct
import subprocess
Expand Down
2 changes: 2 additions & 0 deletions scripts/run_sim.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
# Copyright lowRISC Contributors.
# SPDX-License-Identifier: Apache-2.0

sonata_simulator -E $SONATA_SIM_BOOT_STUB -E $1