Skip to content

✅ CI

✅ CI #20

Workflow file for this run

# Copyright 2024 Khalil Estell
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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.
name: ✅ CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 12 * * 0"
jobs:
build_and_package:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: 📥 Install CMake + Conan
run: pip3 install cmake conan
- name: 📡 Add `libhal` repo to conan remotes
run: conan remote add libhal
https://libhal.jfrog.io/artifactory/api/conan/trunk-conan
- name: 📡 Create and setup default profile
run: conan profile detect --force
- name: 👁️‍🗨️ Show conan profile
run: conan profile show
- name: 📡 Install linux default profiles
run: conan config install -sf profiles/x86_64/linux/ -tf profiles https://github.com/libhal/conan-config.git
- name: 📡 Sign into JFrog Artifactory
if: ${{ github.ref == 'refs/heads/main' }}
env:
API_KEY: ${{ secrets.JFROG_LIBHAL_TRUNK_API_KEY }}
JFROG_USER: ${{ secrets.JFROG_LIBHAL_TRUNK_USER }}
run: conan remote login -p $API_KEY libhal $JFROG_USER
- name: Install libhal settings_user.yml
run: conan config install -sf profiles/baremetal/v2 https://github.com/libhal/conan-config.git
- name: Install host OS profiles
run: conan config install -sf profiles/x86_64/linux/ -tf profiles https://github.com/libhal/conan-config.git
- name: Install compiler profiles
run: conan config install -tf profiles -sf conan/profiles/v1 https://github.com/libhal/arm-gnu-toolchain.git
- name: Install "libhal-lpc40" platform profiles
run: conan config install -tf profiles -sf conan/profiles/v2 https://github.com/libhal/libhal-lpc40.git
- name: Install "libhal-stm32f1" platform profiles
run: conan config install -tf profiles -sf conan/profiles/v2 https://github.com/libhal/libhal-stm32f1.git
- name: 📦 Create `MinSizeRel` package for lpc4078
run: conan create . --version=10.6.0 -pr lpc4078 -pr arm-gcc-12.3 -s build_type=MinSizeRel -b missing
- name: 📦 Create `MinSizeRel` package for stm32f103re
run: conan create . --version=10.6.0 -pr stm32f103re -pr arm-gcc-12.3 -s build_type=MinSizeRel -b missing
- name: 📦 Build demo for lpc4078
run: conan build demos -pr lpc4078 -pr arm-gcc-12.3 -s build_type=MinSizeRel
- name: 📦 Build demo for stm32f103re
run: conan build demos -pr stm32f103re -pr arm-gcc-12.3 -s build_type=MinSizeRel