Skip to content

Commit 4610ac5

Browse files
committed
♻️ Upgrade libhal-mac
1 parent 06821a1 commit 4610ac5

29 files changed

Lines changed: 466 additions & 202 deletions

.cspell.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"version": "0.2",
33
"language": "en",
4-
"words": []
5-
}
4+
"words": [
5+
"Khalil",
6+
"Estell",
7+
"libhal"
8+
]
9+
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Summary
2+
3+
<!-- Briefly describe what this PR does and why. -->
4+
5+
## Related Issue
6+
7+
<!-- Link the issue this PR addresses: Closes #123 -->
8+
9+
## Changes
10+
11+
<!-- List the key changes made in this PR. -->
12+
13+
-
14+
15+
## Test Plan
16+
17+
<!-- How were these changes tested? -->
18+
19+
- [ ] All CI checks pass
20+
- [ ] New/updated tests cover the changes
21+
- [ ] Tested locally with `conan create .`

.github/workflows/api.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2024 - 2025 Khalil Estell and the libhal contributors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: 📚 Deploy APIs
16+
17+
on:
18+
release:
19+
types:
20+
- published
21+
push:
22+
branches:
23+
- main
24+
workflow_dispatch:
25+
26+
permissions:
27+
contents: write
28+
29+
jobs:
30+
api:
31+
uses: libhal/ci/.github/workflows/api_docs_gen.yml@5.x.y
32+
secrets: inherit

.github/workflows/ci.yml

Lines changed: 27 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -12,82 +12,49 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: 🧪 tests
15+
name: 🧪 CI
1616

1717
on:
1818
workflow_dispatch:
1919
pull_request:
2020
push:
2121
branches:
2222
- main
23-
schedule:
24-
- cron: "0 12 * * 0"
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
cancel-in-progress: true
2527

2628
jobs:
29+
pre-commit:
30+
name: 🧹 Lint
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-python@v5
35+
with:
36+
python-version: "3.12"
37+
- run: sudo apt-get install -y doxygen
38+
- uses: pre-commit/action@v3.0.1
39+
2740
run_tests:
2841
strategy:
2942
fail-fast: false
3043
matrix:
3144
include:
32-
- os: macos-14
33-
profile_path: profiles/x86_64/mac-14/
34-
3545
- os: macos-15
36-
profile_path: profiles/x86_64/mac-15/
3746

3847
runs-on: ${{ matrix.os }}
3948
steps:
4049
- uses: actions/checkout@v4.1.1
41-
42-
- name: 📥 Install OS Specific Tools (macos-14)
43-
if: ${{ matrix.os == 'macos-14' }}
44-
run: |
45-
brew install llvm@17
46-
ln -s $(brew --prefix llvm@17)/bin/clang-tidy /usr/local/bin/
47-
brew install pipx
48-
pipx ensurepath
49-
50-
- name: 📥 Install OS Specific Tools (macos-15)
51-
if: ${{ matrix.os == 'macos-15' }}
52-
run: |
53-
brew install llvm@17
54-
ln -s $(brew --prefix llvm@17)/bin/clang-tidy /usr/local/bin/
55-
brew install pipx
56-
pipx ensurepath
57-
58-
- name: 📥 Install Conan 2.18.0
59-
run: pipx install conan==2.18.0
60-
61-
- name: 🔍 conan version
62-
run: conan --version
63-
64-
- name: 🔍 cmake version
65-
run: cmake --version
66-
67-
- name: 🔍 clang++ version
68-
run: clang++-17 --version || clang++ --version
69-
70-
- name: 🔍 /usr/bin version
71-
run: ls /usr/bin/clang*
72-
73-
- name: 🔍 clang-tidy version
74-
run: clang-tidy-17 --version || clang-tidy --version
75-
76-
- name: 📡 Add `libhal` repo to conan remotes
77-
run: conan remote add libhal
78-
https://libhal.jfrog.io/artifactory/api/conan/trunk-conan
79-
80-
- name: 📡 Create and setup default profile
81-
run: conan profile detect --force
82-
83-
- name: 👁️‍🗨️ Show conan profile (original)
84-
run: conan profile show
85-
86-
- name: 📡 Install default profiles
87-
run: conan config install -sf ${{ matrix.profile_path }} -tf profiles https://github.com/libhal/conan-config.git
88-
89-
- name: 👁️‍🗨️ Show conan profile (new)
90-
run: conan profile show
91-
92-
- name: 🔬 Create & Run Unit Tests
93-
run: VERBOSE=1 conan create . --build=missing -s build_type=MinSizeRel --version="latest"
50+
- run: pipx install conan>=2.18.0
51+
- run: conan --version
52+
- run: conan config install https://github.com/libhal/conan-config2.git
53+
- run: conan hal setup
54+
- run: conan profile show
55+
- run: conan create . -pr:a hal/tc/llvm -s build_type=Release
56+
- run: conan create . -pr:a hal/tc/llvm -s build_type=MinSizeRel
57+
- run: conan create . -pr:a hal/tc/llvm -s build_type=Debug
58+
- run: conan build demos -pr:a hal/tc/llvm -s build_type=Release
59+
- run: conan build demos -pr:a hal/tc/llvm -s build_type=MinSizeRel
60+
- run: conan build demos -pr:a hal/tc/llvm -s build_type=Debug

.github/workflows/deploy.yml

Lines changed: 8 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -14,102 +14,19 @@ jobs:
1414
matrix:
1515
include:
1616
- os: macos-14
17-
profile_path: profiles/armv8/mac-14/
18-
1917
- os: macos-15
20-
profile_path: profiles/armv8/mac-15/
2118

2219
runs-on: ${{ matrix.os }}
2320
steps:
2421
- uses: actions/checkout@v4.1.1
25-
26-
- name: 📥 Install OS Specific Tools (macos-14)
27-
if: ${{ matrix.os == 'macos-14' }}
28-
run: |
29-
brew install llvm@17
30-
ln -s $(brew --prefix llvm@17)/bin/clang-tidy /usr/local/bin/
31-
brew install pipx
32-
pipx ensurepath
33-
34-
- name: 📥 Install OS Specific Tools (macos-15)
35-
if: ${{ matrix.os == 'macos-15' }}
36-
run: |
37-
brew install llvm@17
38-
ln -s $(brew --prefix llvm@17)/bin/clang-tidy /usr/local/bin/
39-
brew install pipx
40-
pipx ensurepath
41-
42-
- name: 📥 Install Conan 2.18.0
43-
run: pipx install conan==2.18.0
44-
45-
- name: 🔍 conan version
46-
run: conan --version
47-
48-
- name: 🔍 cmake version
49-
run: cmake --version
50-
51-
- name: 🔍 clang++ version
52-
run: clang++-17 --version || clang++ --version
53-
54-
- name: 🔍 /usr/bin version
55-
run: ls /usr/bin/clang*
56-
57-
- name: 🔍 clang-tidy version
58-
run: clang-tidy-17 --version || clang-tidy --version
59-
60-
- name: 📡 Add `libhal` repo to conan remotes
61-
run: conan remote add libhal
62-
https://libhal.jfrog.io/artifactory/api/conan/trunk-conan
63-
64-
- name: 📡 Create and setup default profile
65-
run: conan profile detect --force
66-
67-
- name: 👁️‍🗨️ Show conan profile (original)
68-
run: conan profile show
69-
70-
- name: 📡 Install default system profile for ${{ matrix.os }}
71-
run: conan config install -sf ${{ matrix.profile_path }} -tf profiles https://github.com/libhal/conan-config.git
72-
73-
- name: 📡 Install libhal platform profiles for mac
74-
run: conan config install -sf conan/profiles/v1 -tf profiles https://github.com/libhal/libhal-mac.git
75-
76-
- name: 👁️‍🗨️ Show conan profile (new)
77-
run: conan profile show
78-
79-
- name: 📡 Install libhal settings_user.yml
80-
run: conan config install -sf profiles/baremetal/v2 https://github.com/libhal/conan-config.git
81-
82-
- name: Set Version Environment Variable
83-
run: |
84-
if [ -z "${{ github.ref_name }}" ]; then
85-
echo "VERSION=latest" >> $GITHUB_ENV
86-
else
87-
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
88-
fi
89-
90-
- name: 📦 Create `Debug` package for ${{ inputs.profile }}
91-
run: conan create . -pr mac-hal -s build_type=Debug --version=${{ env.VERSION }}
92-
93-
- name: 📦 Create `RelWithDebInfo` package for ${{ inputs.profile }}
94-
run: conan create . -pr mac-hal -s build_type=RelWithDebInfo --version=${{ env.VERSION }}
95-
96-
- name: 📦 Create `MinSizeRel` package for ${{ inputs.profile }}
97-
run: conan create . -pr mac-hal -s build_type=MinSizeRel --version=${{ env.VERSION }}
98-
99-
- name: 📦 Create `Release` package for ${{ inputs.profile }}
100-
run: conan create . -pr mac-hal -s build_type=Release --version=${{ env.VERSION }}
101-
102-
- name: 🧱 Build demos (Debug)
103-
run: conan build demos -pr mac-hal -s build_type=Debug
104-
105-
- name: 🧱 Build demos (RelWithDebInfo)
106-
run: conan build demos -pr mac-hal -s build_type=RelWithDebInfo
107-
108-
- name: 🧱 Build demos (MinSizeRel)
109-
run: conan build demos -pr mac-hal -s build_type=MinSizeRel
110-
111-
- name: 🧱 Build demos (Release)
112-
run: conan build demos -pr mac-hal -s build_type=Release
22+
- run: pipx install conan>=2.18.0
23+
- run: conan --version
24+
- run: conan config install https://github.com/libhal/conan-config2.git
25+
- run: conan hal setup
26+
- run: conan profile show
27+
- run: conan create . -pr:a hal/tc/llvm -s build_type=Debug --version=${{ github.ref_name }}
28+
- run: conan create . -pr:a hal/tc/llvm -s build_type=MinSizeRel --version=${{ github.ref_name }}
29+
- run: conan create . -pr:a hal/tc/llvm -s build_type=Release --version=${{ github.ref_name }}
11330

11431
- name: 📡 Sign into JFrog Artifactory
11532
env:

.github/workflows/take.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright 2024 - 2025 Khalil Estell and the libhal contributors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# .github/workflows/take.yml
16+
name: 📛 assign issue to contributor
17+
on:
18+
issue_comment:
19+
20+
jobs:
21+
assign:
22+
name: Take an issue
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: take the issue
26+
uses: bdougie/take-action@main
27+
env:
28+
GITHUB_TOKEN: ${{ github.token }}
29+
with:
30+
message: Thanks for taking this issue! Let us know if you have any questions!

.pre-commit-config.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
repos:
2+
# General file fixes
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.5.0
5+
hooks:
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- id: mixed-line-ending
9+
args: [--fix=lf]
10+
11+
# Spell checking
12+
- repo: https://github.com/streetsidesoftware/cspell-cli
13+
rev: v8.6.0
14+
hooks:
15+
- id: cspell
16+
files: \.(cpp|cppm|hpp|h|md)$
17+
18+
# C++ formatting with clang-format
19+
- repo: https://github.com/pre-commit/mirrors-clang-format
20+
rev: v21.1.8
21+
hooks:
22+
- id: clang-format
23+
types_or: [c, c++]
24+
files: \.(cpp|cppm|hpp|h|c)$
25+
26+
# Doxygen documentation checker
27+
- repo: local
28+
hooks:
29+
- id: doxygen-check
30+
name: doxygen-check
31+
entry: doxygen
32+
args: [docs/doxygen.conf]
33+
language: system
34+
pass_filenames: false
35+
files: \.(cpp|cppm|hpp|h)$

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ libhal_test_and_make_library(
3434
LINK_LIBRARIES
3535
libhal::libhal
3636
libhal::util
37-
)
37+
)

0 commit comments

Comments
 (0)