mirror of
https://github.com/lupyuen/nuttx-sg2000.git
synced 2025-01-12 20:58:29 +08:00
Paste the GitHub Repo and Branch
This commit is contained in:
parent
bcf4a3b109
commit
658f1ff54e
1 changed files with 22 additions and 11 deletions
33
.github/workflows/sg2000-special.yml
vendored
33
.github/workflows/sg2000-special.yml
vendored
|
@ -23,6 +23,28 @@ jobs:
|
|||
|
||||
steps:
|
||||
|
||||
- name: Checkout Source Files
|
||||
run: |
|
||||
## TODO: Paste the GitHub Repo and Branch
|
||||
source=https://github.com/apache/nuttx/tree/main
|
||||
|
||||
## Match `https://github.com/user/repo/tree/branch`
|
||||
pattern='\(.*\)\/tree\/\(.*\)'
|
||||
|
||||
## `url` becomes `https://github.com/user/repo`
|
||||
## `branch` becomes `branch`
|
||||
url=`echo $source | sed "s/$pattern/\1/"`
|
||||
branch=`echo $source | sed "s/$pattern/\2/"`
|
||||
|
||||
## Check out the `url` and `branch`
|
||||
mkdir nuttx
|
||||
cd nuttx
|
||||
git clone \
|
||||
$url \
|
||||
--branch $branch \
|
||||
nuttx
|
||||
git clone https://github.com/apache/nuttx-apps apps
|
||||
|
||||
- name: Install Build Tools
|
||||
run: |
|
||||
sudo apt -y update
|
||||
|
@ -39,17 +61,6 @@ jobs:
|
|||
wget --no-check-certificate https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz
|
||||
tar -xf xpack-riscv-none-elf-gcc-*.tar.gz
|
||||
|
||||
- name: Checkout Source Files
|
||||
run: |
|
||||
mkdir nuttx
|
||||
cd nuttx
|
||||
git clone \
|
||||
https://github.com/apache/nuttx \
|
||||
--branch master \
|
||||
nuttx
|
||||
## git clone https://github.com/apache/nuttx nuttx
|
||||
git clone https://github.com/apache/nuttx-apps apps
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
## Add toolchain to PATH
|
||||
|
|
Loading…
Reference in a new issue