Skip to content

Commit 5c4bd50

Browse files
authored
🚀 CI v6 (#94)
* 🚀 CI v6 * Remove some tests to reduce server time * ♻️ Use libhal/conan-config2 * Add config2_version to tests and package_and_upload * Use host profile for toolchain * 🐛 Fix runner os for a few * Remove cortex-m0 from list of upload all * upgrade conan version * test self check further * Adding more tests and adding windows back after a fix was landed in libhal * Migrate to demo_builder for all self tests * add cmake to missing builds * reduce CI self check to just 3 * Remove windows from any native builds * (skip ci) Add back original deploy.yml script * (skip ci) Mark deprecated workflows as such
1 parent 989b5e5 commit 5c4bd50

13 files changed

Lines changed: 958 additions & 347 deletions

.github/workflows/app_builder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: 🏗️ App Builder
15+
name: 🏗️ App Builder (DEPRECATED use app_builder2.yml)
1616

1717
on:
1818
workflow_call:

.github/workflows/app_builder2.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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: 🏗️ App Builder 2
16+
17+
on:
18+
workflow_call:
19+
inputs:
20+
repo:
21+
type: string
22+
default: ${{ github.repository }}
23+
version:
24+
type: string
25+
default: ""
26+
conan_version:
27+
type: string
28+
default: "2.16.1"
29+
compiler_profile:
30+
type: string
31+
required: true
32+
platform_profile:
33+
type: string
34+
required: true
35+
config2_version:
36+
type: string
37+
default: main
38+
dir: # Directory where the conan package exists
39+
type: string
40+
default: "."
41+
42+
jobs:
43+
build:
44+
runs-on: ubuntu-22.04
45+
steps:
46+
- uses: actions/checkout@v4.1.1
47+
if: ${{ inputs.version != '' }}
48+
with:
49+
submodules: true
50+
repository: ${{ inputs.repo }}
51+
ref: ${{ inputs.version }}
52+
53+
- uses: actions/checkout@v4.1.1
54+
if: ${{ inputs.version == '' }}
55+
with:
56+
submodules: true
57+
repository: ${{ inputs.repo }}
58+
59+
- name: 📥 Install Conan ${{ inputs.conan_version }}
60+
run: pipx install conan==${{ inputs.conan_version }}
61+
62+
- name: 📡 Add `libhal` repo to conan remotes
63+
run: conan remote add libhal
64+
https://libhal.jfrog.io/artifactory/api/conan/trunk-conan
65+
66+
- name: 📡 Create and setup default profile
67+
run: conan profile detect --force
68+
69+
- name: 👁️‍🗨️ Show conan profile
70+
run: conan profile show
71+
72+
- name: Install libhal conan config
73+
run: conan config install https://github.com/libhal/conan-config2.git --args="-b ${{ inputs.config2_version }}"
74+
75+
- name: 🏗️ Build Application for ${{ inputs.profile }}
76+
run: conan build ${{ inputs.dir }} -pr ${{ inputs.compiler_profile }} -pr ${{ inputs.platform_profile }}

.github/workflows/demo_builder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: 🏗️ Demo Builder
15+
name: 🏗️ Demo Builder (DEPRECATED use app_builder2.yml)
1616

1717
on:
1818
workflow_call:

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: 📦🚀 Package & Deploy
15+
name: 📦🚀 Package & Deploy (DEPRECATED use package_and_upload.yml)
1616

1717
on:
1818
workflow_call:

.github/workflows/deploy_all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: Deploy ALL
15+
name: Deploy ALL (DEPRECATED use package_and_upload_all.yml)
1616

1717
# Builds packages for every device and architecture libhal supports
1818

.github/workflows/deploy_linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: 🐧 Deploy Linux
15+
name: 🐧 Deploy Linux (DEPRECATED use package_and_upload.yml)
1616

1717
on:
1818
workflow_call:

.github/workflows/deploy_mac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: 🍎 Deploy Mac
15+
name: 🍎 Deploy Mac (DEPRECATED use package_and_upload.yml)
1616

1717
on:
1818
workflow_call:

.github/workflows/library_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ on:
3434
default: "40 80"
3535
source_dir:
3636
type: string
37-
default: "src/"
37+
default: src
3838
repo:
3939
type: string
4040
default: ${{ github.repository }}
4141
conan_version:
4242
type: string
43-
default: "2.16.1"
43+
default: 2.22.2
4444
# Directory where the conan package exists
4545
dir:
4646
type: string
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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: 📦 Conan Package & Upload
16+
17+
on:
18+
workflow_call:
19+
inputs:
20+
library:
21+
type: string
22+
default: ${{ github.event.repository.name }}
23+
repo:
24+
type: string
25+
default: ${{ github.repository }}
26+
conan_version:
27+
type: string
28+
default: 2.18.0
29+
config2_version:
30+
type: string
31+
default: main
32+
version:
33+
type: string
34+
default: latest # "latest" means (do not upload)
35+
runner_os:
36+
type: string
37+
required: true
38+
arch:
39+
type: string
40+
required: true
41+
os:
42+
type: string
43+
required: true
44+
compiler_profile:
45+
type: string
46+
required: true
47+
dir: # Directory where the conan package exists
48+
type: string
49+
default: .
50+
remote_url: # Path to conan package repo
51+
type: string
52+
default: ""
53+
54+
secrets:
55+
conan_remote_user:
56+
required: false
57+
conan_remote_password:
58+
required: false
59+
jobs:
60+
package_and_upload:
61+
runs-on: ${{ inputs.runner_os }}
62+
env:
63+
VERBOSE: 1
64+
CONAN_REMOTE_USER: ${{ secrets.conan_remote_user }}
65+
CONAN_REMOTE_PASSWORD: ${{ secrets.conan_remote_password }}
66+
steps:
67+
- uses: actions/checkout@v4.1.1
68+
if: ${{ inputs.version != 'latest' }}
69+
with:
70+
submodules: true
71+
repository: ${{ inputs.repo }}
72+
ref: ${{ inputs.version }}
73+
74+
- uses: actions/checkout@v4.1.1
75+
if: ${{ inputs.version == 'latest' }}
76+
with:
77+
submodules: true
78+
repository: ${{ inputs.repo }}
79+
80+
- name: 📥 Install Conan ${{ inputs.conan_version }}
81+
run: pipx install conan==${{ inputs.conan_version }}
82+
83+
- name: 🔍 conan version
84+
run: conan --version
85+
86+
- name: 📡 Create and setup default profile
87+
run: conan profile detect --force
88+
89+
- name: 📡 Add conan libhal remote
90+
run: conan remote add libhal https://libhal.jfrog.io/artifactory/api/conan/trunk-conan
91+
92+
- name: 📡 Add conan user remote-package-repo
93+
if: ${{ inputs.remote_url != '' }}
94+
run: conan remote add --force remote-package-repo ${{ inputs.remote_url }}
95+
# We use --force to allow the remote-package-repo to also be the libhal
96+
# repo.
97+
98+
- name: 📡 Install libhal settings_user.yml
99+
run: conan config install https://github.com/libhal/conan-config2.git --args="-b ${{ inputs.config2_version }}"
100+
101+
- name: 📦 Create `Debug` package for ${{ inputs.profile }}
102+
run: conan create ${{ inputs.dir }} -s:h build_type=Debug -s:h os=${{ inputs.os }} -s:h arch=${{ inputs.arch }} --version=${{ inputs.version }} -pr:h ${{ inputs.compiler_profile }} --build=missing
103+
104+
- name: 📦 Create `MinSizeRel` package for ${{ inputs.profile }}
105+
run: conan create ${{ inputs.dir }} -s:h build_type=MinSizeRel -s:h os=${{ inputs.os }} -s:h arch=${{ inputs.arch }} --version=${{ inputs.version }} -pr:h ${{ inputs.compiler_profile }} --build=missing
106+
107+
- name: 📦 Create `Release` package for ${{ inputs.profile }}
108+
run: conan create ${{ inputs.dir }} -s:h build_type=Release -s:h os=${{ inputs.os }} -s:h arch=${{ inputs.arch }} --version=${{ inputs.version }} -pr:h ${{ inputs.compiler_profile }} --build=missing
109+
110+
- name: 📡 Sign into Conan Package Repository
111+
if: ${{ inputs.version != 'latest' && inputs.remote_url != '' && env.CONAN_REMOTE_USER != '' && env.CONAN_REMOTE_PASSWORD != '' }}
112+
run: conan remote login -p ${{ secrets.conan_remote_password }} remote-package-repo ${{ secrets.conan_remote_user }}
113+
114+
- name: 🆙 Upload package version ${{ inputs.version }} to conan repo
115+
if: ${{ inputs.version != 'latest' && inputs.remote_url != '' }}
116+
run: conan upload "${{ inputs.library }}/${{ inputs.version }}" --confirm -r=remote-package-repo

0 commit comments

Comments
 (0)