Skip to content

Commit e53f002

Browse files
authored
Initial commit
0 parents  commit e53f002

File tree

13 files changed

+406
-0
lines changed

13 files changed

+406
-0
lines changed

.clangd

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
CompileFlags:
2+
Add:
3+
- -Wall
4+
- -Wextra
5+
- -Werror
6+
Remove:
7+
- -m*
8+
- -fstrict-volatile-bitfields
9+
10+
Style:
11+
FullyQualifiedNamespaces:
12+
- "*"
13+
14+
Diagnostics:
15+
ClangTidy:
16+
FastCheckFilter: Loose

.devcontainer/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM ghcr.io/classpaddev/hollyhock-3:v2.1.1 AS toolchain
2+
3+
FROM mcr.microsoft.com/devcontainers/base:debian12 AS base
4+
5+
# Install required packages KEEP IN SYNC (+clangd bear nano)
6+
RUN apt-get update -y && apt-get upgrade -y && \
7+
apt-get install -y --no-install-recommends \
8+
make libncurses6 zstd zlib1g \
9+
gawk wget bzip2 xz-utils unzip \
10+
patch libstdc++6 rsync git mold \
11+
nano clangd-19 bear
12+
RUN apt-get install -y --reinstall ca-certificates
13+
COPY --from=toolchain /toolchain /toolchain
14+
COPY --from=toolchain /sdk /sdk
15+
ENV PATH=$PATH:/toolchain/bin
16+
ENV SDK_DIR=/sdk

.devcontainer/devcontainer.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"build": {
3+
"dockerfile": "Dockerfile"
4+
},
5+
"customizations": {
6+
"vscode": {
7+
"extensions": [
8+
"ms-vscode.makefile-tools",
9+
"ms-vscode.cpptools-themes",
10+
"ms-vscode.cpptools",
11+
"xaver.clang-format",
12+
"llvm-vs-code-extensions.vscode-clangd",
13+
"ZixuanWang.linkerscript",
14+
"ms-azuretools.vscode-docker"
15+
]
16+
}
17+
}
18+
}

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "devcontainers"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
17+
- package-ecosystem: "devcontainers"
18+
directory: "/"
19+
schedule:
20+
interval: "weekly"
21+
target-branch: "ugfx"
22+
- package-ecosystem: "github-actions"
23+
directory: "/"
24+
schedule:
25+
interval: "weekly"
26+
target-branch: "ugfx"

.github/workflows/c-cpp.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: C/C++ CI
2+
3+
on:
4+
push:
5+
branches: [ "main", "ugfx" ]
6+
# Publish semver tags as releases.
7+
tags: [ 'v*.*.*' ]
8+
pull_request:
9+
branches: [ "main", "ugfx" ]
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build-artifact:
17+
runs-on: ubuntu-latest
18+
container:
19+
image: ghcr.io/classpaddev/hollyhock-3:v2.1.1
20+
credentials:
21+
username: ${{ github.actor }}
22+
password: ${{ secrets.github_token }}
23+
24+
steps:
25+
- uses: actions/checkout@v5
26+
with:
27+
submodules: true
28+
- run: make -j
29+
- uses: actions/upload-artifact@v4
30+
with:
31+
path: dist/**

.github/workflows/codeql.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "main", "ugfx" ]
17+
pull_request:
18+
branches: [ "main", "ugfx" ]
19+
schedule:
20+
- cron: '32 6 * * 2'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: actions
47+
build-mode: none
48+
- language: c-cpp
49+
build-mode: none
50+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
51+
# Use `c-cpp` to analyze code written in C, C++ or both
52+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
53+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
54+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
55+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
56+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
57+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
58+
steps:
59+
- name: Checkout repository
60+
uses: actions/checkout@v5
61+
with:
62+
submodules: true
63+
64+
# Add any setup steps before running the `github/codeql-action/init` action.
65+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
66+
# or others). This is typically only required for manual builds.
67+
# - name: Setup runtime (example)
68+
# uses: actions/setup-example@v1
69+
#- name: Download docker image
70+
# run: docker pull ghcr.io/classpaddev/hollyhock-3:v2.1.1
71+
72+
# Initializes the CodeQL tools for scanning.
73+
- name: Initialize CodeQL
74+
uses: github/codeql-action/init@v3
75+
with:
76+
languages: ${{ matrix.language }}
77+
build-mode: ${{ matrix.build-mode }}
78+
# If you wish to specify custom queries, you can do so here or in a config file.
79+
# By default, queries listed here will override any specified in a config file.
80+
# Prefix the list here with "+" to use these queries and those in the config file.
81+
82+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
83+
# queries: security-extended,security-and-quality
84+
85+
# If the analyze step fails for one of the languages you are analyzing with
86+
# "We were unable to automatically build your code", modify the matrix above
87+
# to set the build mode to "manual" for that language. Then modify this step
88+
# to build your code.
89+
# ℹ️ Command-line programs to run using the OS shell.
90+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
91+
#- if: matrix.build-mode == 'manual'
92+
# name: Do manual build
93+
# run: docker run --rm -t -v $PWD:/work ghcr.io/classpaddev/hollyhock-3:v2.1.1 make -j
94+
95+
- name: Perform CodeQL Analysis
96+
uses: github/codeql-action/analyze@v3
97+
with:
98+
category: "/language:${{matrix.language}}"

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist/
2+
obj/
3+
.cache/
4+
.deps/
5+
compile_commands.json

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"clangd.arguments": [
3+
"--query-driver=/toolchain/bin/sh4a_nofpueb-elf-*"
4+
],
5+
"clangd.path": "clangd-19"
6+
}

.vscode/tasks.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "build",
8+
"type": "shell",
9+
"command": "make",
10+
"problemMatcher": [
11+
"$gcc"
12+
],
13+
"group": {
14+
"kind": "build",
15+
"isDefault": true
16+
}
17+
},
18+
{
19+
"label": "clean",
20+
"type": "shell",
21+
"command": "make clean",
22+
"problemMatcher": [],
23+
"group": "build"
24+
},
25+
{
26+
"label": "compile commands",
27+
"type": "shell",
28+
"command": "make compile_commands.json",
29+
"problemMatcher": [],
30+
"group": "build"
31+
}
32+
]
33+
}

LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
This is free and unencumbered software released into the public domain.
2+
3+
Anyone is free to copy, modify, publish, use, compile, sell, or
4+
distribute this software, either in source code form or as a compiled
5+
binary, for any purpose, commercial or non-commercial, and by any
6+
means.
7+
8+
In jurisdictions that recognize copyright laws, the author or authors
9+
of this software dedicate any and all copyright interest in the
10+
software to the public domain. We make this dedication for the benefit
11+
of the public at large and to the detriment of our heirs and
12+
successors. We intend this dedication to be an overt act of
13+
relinquishment in perpetuity of all present and future rights to this
14+
software under copyright law.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.
23+
24+
For more information, please refer to <https://unlicense.org>

0 commit comments

Comments
 (0)