Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ch32v003fun
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Horn
ch32v003fun
Commits
1e1a7597
Commit
1e1a7597
authored
2 years ago
by
maxgerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Try and refactor makefile build
parent
20cbb340
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/build.yml
+17
-12
17 additions, 12 deletions
.github/workflows/build.yml
with
17 additions
and
12 deletions
.github/workflows/build.yml
+
17
−
12
View file @
1e1a7597
name
:
PlatformIO
CI
name
:
Build
CI
on
:
[
push
,
pull_request
]
on
:
[
push
,
pull_request
]
jobs
:
jobs
:
find-examples
:
# Job that list subdirectories
runs-on
:
ubuntu-latest
outputs
:
dir
:
${{ steps.set-dirs.outputs.dir }}
# generate output name dir by using inner step output
steps
:
-
uses
:
actions/checkout@v3
-
id
:
set-dirs
# Give it an id to handle to get step outputs in the outputs key above
run
:
echo "::set-output name=dir::$(find examples -name Makefile -print0 |xargs -0 -n 1 dirname | jq -R -s -c 'split("\n")[:-1]')"
# Define step output named dir base on ls command transformed to JSON thanks to jq
# Build using native Makefile buildsystem
# Build using native Makefile buildsystem
makefile-build
:
makefile-build
:
needs
:
[
find-examples
]
# Depends on previous job
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
strategy
:
fail-fast
:
false
matrix
:
example
:
${{fromJson(needs.find-examples.outputs.dir)}}
steps
:
steps
:
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
-
name
:
Install Dependencies
-
name
:
Install Dependencies
run
:
sudo apt-get update && sudo apt-get install -y build-essential make libnewlib-dev gcc-riscv64-unknown-elf libusb-1.0-0-dev
run
:
sudo apt-get update && sudo apt-get install -y build-essential make libnewlib-dev gcc-riscv64-unknown-elf libusb-1.0-0-dev
-
name
:
Build Blink Example
-
name
:
Build ${{ matrix.example }}
run
:
cd examples/blink && make V=1 -j3 blink.elf && riscv64-unknown-elf-size blink.elf && cd ../..
run
:
cd ${{ matrix.example }} && make V=1 -j3 $(basename ${{ matrix.example }}.elf) && riscv64-unknown-elf-size $(basename ${{ matrix.example }}.elf)
-
name
:
Build debugprintfdemo Example
run
:
cd examples/debugprintfdemo && make V=1 -j3 debugprintfdemo.elf && riscv64-unknown-elf-size debugprintfdemo.elf && cd ../..
# currently not compiling: __get_dscratch0() not defined.
#- name: Build sandbox Example
# run: cd examples/sandbox && make V=1 -j3 sandbox.elf && riscv64-unknown-elf-size sandbox.elf && cd ../..
-
name
:
Build uartdemo Example
run
:
cd examples/uartdemo && make V=1 -j3 uartdemo.elf && riscv64-unknown-elf-size uartdemo.elf && cd ../..
-
name
:
Build ws2812 Example
run
:
cd examples/ws2812demo && make V=1 -j3 ws2812bdemo.elf && riscv64-unknown-elf-size ws2812bdemo.elf && cd ../..
# Build using PlatformIO
# Build using PlatformIO
pio-build
:
pio-build
:
strategy
:
strategy
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment