-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 68564d8
Showing
27 changed files
with
1,391 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "bash" | ||
}, | ||
"extensions": [ | ||
"mkhl.direnv", | ||
"github.vscode-github-actions", | ||
"grafana.vscode-jsonnet", | ||
"ms-vscode.makefile-tools", | ||
"vivaxy.vscode-conventional-commits" | ||
] | ||
} | ||
}, | ||
"image": "mcr.microsoft.com/devcontainers/base:bookworm", | ||
"features": { | ||
"ghcr.io/devcontainers/features/nix:1": { | ||
"version": "latest", | ||
"packages": "cachix,direnv,devenv", | ||
"extraNixConfig": [ | ||
"experimental-features = nix-command flakes", | ||
// Uncomment below to speed up container building in China | ||
// "substituters = https://mirrors.ustc.edu.cn/nix-channels/store https://devenv.cachix.org https://cache.nixos.org", | ||
"trusted-users = root vscode" | ||
] | ||
} | ||
}, | ||
"mounts": [ | ||
{ | ||
"source": "${localWorkspaceFolder}/.devcontainer/.devenv", | ||
"target": "${containerWorkspaceFolder}/.devenv", | ||
"type": "bind" | ||
}, | ||
{ | ||
"source": "${localWorkspaceFolder}/.devcontainer/.direnv", | ||
"target": "${containerWorkspaceFolder}/.direnv", | ||
"type": "bind" | ||
} | ||
], | ||
"workspaceMount": "source=${localWorkspaceFolder}/..,target=/workspaces,type=bind,consistency=cached", | ||
"runArgs": [ | ||
// https://github.com/moby/moby/issues/27195#issuecomment-1410745778 | ||
"--ulimit", "nofile=1024:524288" | ||
], | ||
"overrideCommand": true, | ||
"updateContentCommand": "sudo dpkg --add-architecture arm64 && sudo apt-get update && sudo apt-get build-dep . -y" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_url "https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc" "sha256-YBzqskFZxmNb3kYVoKD9ZixoPXJh1C9ZvTLGFRkauZ0=" | ||
|
||
use devenv |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @RadxaYuntian |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Create release | ||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
token: ${{secrets.GIT_PUSH_TOKEN}} | ||
- name: Create release commit | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends -y git-buildpackage | ||
export DEBEMAIL="dev@radxa.com" | ||
export DEBFULLNAME='"Radxa Computer Co., Ltd"' | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
make dch | ||
- name: Test | ||
run: | | ||
sudo apt-get build-dep --no-install-recommends -y . | ||
make all test deb | ||
- name: Push | ||
run: | | ||
git push |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
name: Build & Release | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths-ignore: | ||
- "**.md" | ||
- .gitignore | ||
- "docs/**" | ||
- "theme/**" | ||
- "po/**" | ||
- book.toml | ||
- .github/workflows/docs.yaml | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**.md" | ||
- .gitignore | ||
- "docs/**" | ||
- "theme/**" | ||
- "po/**" | ||
- book.toml | ||
- .github/workflows/docs.yaml | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
distro: ${{ steps.distro_check.outputs.distro }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: pre-commit check | ||
run: | | ||
pip install pre-commit | ||
if ! pre-commit run --all-files --show-diff-on-failure | ||
then | ||
echo '' | ||
echo '=== Code style issue detected! ===' | ||
echo 'Suggest changes are listed above.' | ||
echo 'Please install pre-commit and run `pre-commit run --all-files` to fix it.' | ||
echo 'Strongly recommended to run `pre-commit install` to catch issues before pushing.' | ||
echo 'You can learn more about pre-commit from https://pre-commit.com/' | ||
exit 1 | ||
fi | ||
- name: Test | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get build-dep --no-install-recommends -y . | ||
sudo apt-get install --no-install-recommends -y git-buildpackage | ||
export DEBEMAIL="dev@radxa.com" | ||
export DEBFULLNAME='"Radxa Computer Co., Ltd"' | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git branch -m GITHUB_RUNNER || true | ||
git branch -D main || true | ||
git switch -c main || true | ||
make dch | ||
make test all deb | ||
git reset --hard HEAD~1 | ||
- name: Build | ||
run: | | ||
make all deb | ||
- name: Workaround actions/upload-artifact#176 | ||
run: | | ||
echo "artifacts_path=$(realpath ..)" >> $GITHUB_ENV | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ github.event.repository.name }} | ||
path: | | ||
${{ env.artifacts_path }}/*.deb | ||
- name: Check if the latest version is releasable | ||
id: distro_check | ||
run: | | ||
version="$(dpkg-parsechangelog -S Version)" | ||
version="${version//\~/.}" | ||
if [[ -n "$(git tag -l "$version")" ]] | ||
then | ||
echo "distro=UNRELEASED" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "distro=$(dpkg-parsechangelog -S Distribution)" >> "$GITHUB_OUTPUT" | ||
fi | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: ${{ github.event_name != 'pull_request' && needs.build.outputs.distro != 'UNRELEASED' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ github.event.repository.name }} | ||
path: .artifacts | ||
- name: Prepare for release | ||
run: | | ||
version="$(dpkg-parsechangelog -S Version)" | ||
version="${version//\~/.}" | ||
echo "version=$version" >> $GITHUB_ENV | ||
echo "changes<<EOF" >> $GITHUB_ENV | ||
echo '```' >> $GITHUB_ENV | ||
echo "$(dpkg-parsechangelog -S Changes)" >> $GITHUB_ENV | ||
echo '```' >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
echo "$version" > VERSION | ||
if [[ -f pkg.conf.template ]] | ||
then | ||
sed "s/VERSION/$version/g" pkg.conf.template > pkg.conf | ||
fi | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ env.version }} | ||
body_path: README.md | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
target_commitish: ${{ github.ref_name }} | ||
draft: false | ||
prerelease: false | ||
fail_on_unmatched_files: false | ||
files: | | ||
.artifacts/**/*.deb | ||
pkg.conf | ||
VERSION | ||
- name: Append changelog | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ env.version }} | ||
body: | | ||
## Changelog for ${{ env.version }} | ||
${{ env.changes }} | ||
append_body: true | ||
- name: Update Test repos | ||
uses: radxa-repo/update-repo-action@main | ||
with: | ||
test-repo: true | ||
token: ${{ secrets.RADXA_APT_TEST_REPO_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Devenv | ||
/.devenv* | ||
/devenv.local.nix | ||
|
||
# direnv | ||
/.direnv | ||
|
||
# pre-commit | ||
/.pre-commit-config.yaml | ||
|
||
# Local VS Code configuration | ||
/.vscode* | ||
|
||
# Debian build artifacts | ||
/.pc | ||
|
||
# Output folder | ||
/out |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[submodule "src/u-boot"] | ||
path = src/u-boot | ||
url = https://github.com/Kwiboo/u-boot-rockchip.git | ||
branch = rk3528-2025.04-wip | ||
[submodule "src/rkbin"] | ||
path = src/rkbin | ||
url = https://github.com/rockchip-linux/rkbin.git |
Oops, something went wrong.