forked from libhal-google/picolibc
-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (56 loc) · 2.38 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: 🚀 deploy
on:
workflow_call:
inputs:
version:
required: true
type: string
jobs:
deploy:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: 📥 Install Conan
run: pip3 install conan==2.0.14
- name: 📡 Add `libhal-trunk` conan remote
run: |
conan remote add libhal-trunk 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 libhal settings_user.yml
run: conan config install -sf profiles/baremetal/v2/ https://github.com/libhal/conan-config.git
- name: 📦 Create Conan Package
run: conan create prebuilt --version=${{ inputs.version }}
- name: 🏗️ Build Demos Conan Package
if: ${{ runner.os != 'Windows' }}
working-directory: prebuilt/demo
run: VERBOSE=1 conan build . -pr profile -s compiler.version="${{ inputs.version }}"
- name: 🏗️ Build Demos Conan Package
if: ${{ runner.os == 'Windows' }}
working-directory: prebuilt/demo
run: conan build . -pr profile -s compiler.version="${{ inputs.version }}"
- name: 📡 Sign into JFrog Artifactory
if: ${{ github.ref == 'refs/heads/main' && runner.os != 'Windows' }}
env:
API_KEY: ${{ secrets.JFROG_LIBHAL_TRUNK_API_KEY }}
JFROG_USER: ${{ secrets.JFROG_LIBHAL_TRUNK_USER }}
run: conan remote login -p $API_KEY libhal-trunk $JFROG_USER
- name: 📡 Sign into JFrog Artifactory (Powershell)
if: ${{ github.ref == 'refs/heads/main' && runner.os == 'Windows' }}
env:
API_KEY: ${{ secrets.JFROG_LIBHAL_TRUNK_API_KEY }}
JFROG_USER: ${{ secrets.JFROG_LIBHAL_TRUNK_USER }}
run: conan remote login -p $env:API_KEY libhal-trunk $env:JFROG_USER
- name: 🆙 Upload `prebuilt-picolibc` to `libhal-trunk` repo
if: ${{ github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-22.04' }}
run: |
conan upload "prebuilt-picolibc/*" --only-recipe --confirm -r=libhal-trunk