Skip to content

✅ CI

✅ CI #3

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:
release:
types:
- published
- deleted
push:
branches:
- main
schedule:
- cron: "0 12 * * 0"
jobs:
pull:
runs-on: ubuntu-22.04
if: github.event.action == 'deleted'
steps:
- 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
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: 🚮 Pulling package version ${{ github.event.release.tag_name }} from `libhal` repo
run: conan remove "libhal-freertos/${{ github.event.release.tag_name }}" --confirm -r=libhal
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 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 processor profiles
run: conan config install -tf profiles -sf conan/profiles/ https://github.com/libhal/libhal-armcortex.git
- name: Install platform profiles
run: conan config install -tf profiles -sf conan/profiles/ https://github.com/libhal/libhal-lpc40.git
- name: Install platform profiles
run: conan config install -tf profiles -sf conan/profiles/ https://github.com/libhal/libhal-stm32f1.git
- name: 📦 Create `MinSizeRel` package for lpc4078
run: conan create . --version=10.6.0 -pr lpc4078 -s build_type=MinSizeRel -b missing
- name: 📦 Create `MinSizeRel` package for stm32f103c8
run: conan create . --version=10.6.0 -pr stm32f103c8 -s build_type=MinSizeRel -b missing
- name: 🆙 Upload package version ${{ github.ref_name }} to `libhal` repo
if: startsWith(github.ref, 'refs/tags/')
run: conan upload --only-recipe "libhal-freertos/${{ github.ref_name }}" --confirm -r=libhal