Skip to content
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
77 changes: 77 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Licensed under the Apache License v. 2 (the "License")
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0.html
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright (C) 2025-2025 xqyjlj<xqyjlj@126.com>
#
# @author xqyjlj
# @file build_release.yml
#
# Change Logs:
# Date Author Notes
# ------------ ---------- -----------------------------------------------
# 2025-01-16 xqyjlj initial version
#

name: build

on:
push:
pull_request:

jobs:
build:
name: 🧪 build
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: examples/led
file: led.csp
steps:
- name: ⬇️ checkout csp_hal_apm32f1
uses: actions/checkout@v5
with:
submodules: true

- name: ⬇️ install csp-server
uses: csplink/action_setup_csp@master

- name: ⬇️ install csp package
shell: bash
run: |
csp-server --version
wget https://github.com/csplink/toolchains/releases/download/arm-none-eabi/gcc-arm-none-eabi-10.3.1.linux.csppack -O gcc-arm-none-eabi.linux.csppack
csp-server install gcc-arm-none-eabi.linux.csppack
csp-server install .

- name: 👷 build
shell: bash
run: |
pushd ${{ matrix.target }}
csp-server gen ${{ matrix.file }}
mkdir -pv build.cmake
pushd build.cmake
cmake ..
make -j$(nproc) VERBOSE=1
mkdir -pv artifact
mv *.elf artifact
mv *.bin artifact
mv *.hex artifact
mv *.map artifact
popd
popd

- name: ⬆️ upload artifact
uses: actions/upload-artifact@v5
with:
name: artifact
path: ${{ matrix.target }}/build.cmake/artifact
128 changes: 0 additions & 128 deletions .github/workflows/build_release.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Licensed under the GNU General Public License v. 3 (the "License")
# Licensed under the Apache License v. 2 (the "License")
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.gnu.org/licenses/gpl-3.0.html
# https://www.apache.org/licenses/LICENSE-2.0.html
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand Down Expand Up @@ -37,6 +37,7 @@ jobs:
mirror:
name: 💕 mirror to another location
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'csplink' }}
steps:
- name: 💕 mirror
uses: csplink/action_git_mirror/@master
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Licensed under the Apache License v. 2 (the "License")
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0.html
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright (C) 2025-2025 xqyjlj<xqyjlj@126.com>
#
# @author xqyjlj
# @file build_release.yml
#
# Change Logs:
# Date Author Notes
# ------------ ---------- -----------------------------------------------
# 2025-01-16 xqyjlj initial version
#

name: release

on:
push:
pull_request:

jobs:
release:
name: ⬆️ release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: ⬇️ checkout csp_hal_apm32f1
uses: actions/checkout@v5
with:
submodules: true

- name: ⬇️ install csp-server
uses: csplink/action_setup_csp@master

- name: 👷 deploy
shell: bash
run: |
csp-server --version
sed -i 's/latest/${{ github.ref_name }}/g' ./csp_hal_apm32f1.csppdsc
csp-server make-pkg .
file csp_hal_apm32f1-${{ github.ref_name }}.csppack

- name: ⬆️ create release
uses: softprops/action-gh-release@v2
with:
name: csp_hal_apm32f1 ${{ github.ref_name }}
draft: true
prerelease: true
token: ${{ secrets.RELEASE_TOKEN }}
files: |
csp_hal_apm32f1-${{ github.ref_name }}.csppack
2 changes: 1 addition & 1 deletion README-zh_CN.md → README-zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">
<a href="https://csplink.top">
<img width="160" heigth="160" src="https://csplink.top/assets/img/logo.svg" alt="logo" />
<img width="160" heigth="160" src="https://csplink.top/images/logo.svg" alt="logo" />
</a>
<h1>CSP HAL APM32F1</h1>
<div>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">
<a href="https://csplink.top">
<img width="160" heigth="160" src="https://csplink.top/assets/img/logo.svg" alt="logo" />
<img width="160" heigth="160" src="https://csplink.top/images/logo.svg" alt="logo" />
</a>
<h1>CSP HAL APM32F1</h1>
<div>
Expand Down Expand Up @@ -43,7 +43,7 @@
<i>Chip Support Package for APM32F1 Series.</i><br/>
</div>

**English** | [中文](README-zh_CN.md)
**English** | [中文](README-zh-cn.md)

## ✨ Features

Expand Down
8 changes: 4 additions & 4 deletions csp_hal_apm32f1.csppdsc
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ type: hal
vendor: Geehy
vendorUrl:
en: https://geehy.com
zh_CN: https://geehy.com
zh-cn: https://geehy.com
description:
en: Chip Support Package for APM32F1 for CSP Software
zh_CN: Chip Support Package for APM32F1 for CSP Software
zh-cn: APM32F1芯片支持包
url:
en: https://geehy.com
zh_CN: https://geehy.com
en: https://github.com/csplink/csp_hal_apm32f1
zh-cn: https://github.com/csplink/csp_hal_apm32f1
support: xqyjlj@126.com
Loading