forked from NTNU-IHB/FMI4cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (74 loc) · 2.67 KB
/
upload.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
71
72
73
74
75
76
77
78
79
80
name: Upload conan recipe
env:
CONAN_LOGIN_USERNAME_AIS: ${{ secrets.CONAN_LOGIN_USERNAME_AIS }}
CONAN_PASSWORD_AIS: ${{ secrets.CONAN_PASSWORD_AIS }}
CONAN_REVISIONS_ENABLED: 1
CONAN_NON_INTERACTIVE: True
on: [push, workflow_dispatch]
jobs:
conan-on-linux:
name: Conan
runs-on: ${{matrix.os}}
env:
CC: gcc-${{ matrix.compiler_version }}
CXX: g++-${{ matrix.compiler_version }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
build_type: [Debug, Release]
compiler_version: [9]
compiler_libcxx: [libstdc++11]
steps:
- uses: actions/checkout@v2
- name: Install prerequisites
run: |
sudo pip3 install --upgrade setuptools pip
sudo pip3 install conan
- name: Configure Conan
run: |
conan remote add ais https://ais.jfrog.io/artifactory/api/conan/ais-conan --force
- name: Conan create
run: |
REFNAME="${GITHUB_REF#refs/*/}"
VERSION="v$(<version.txt)"
if [[ $GITHUB_REF == refs/tags/* ]] && [[ $REFNAME == $VERSION ]]; then CHANNEL="stable"
elif [[ $REFNAME == master ]]; then CHANNEL="testing"
else
SHORT_REFNAME="${REFNAME:0:40}"
CHANNEL="testing-${SHORT_REFNAME//\//_}"
fi
conan create -s build_type=${{ matrix.build_type }} -s compiler.version=${{ matrix.compiler_version }} -s compiler.libcxx=${{ matrix.compiler_libcxx }} -b missing . ais/${CHANNEL}
- name: Conan upload
run: conan upload --all --confirm --remote ais 'fmi4cpp*'
conan-on-windows:
name: Conan
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v2
- name: Install prerequisites
run: |
pip3 install --upgrade setuptools pip
pip3 install conan
- name: Configure Conan
run: |
conan remote add ais https://ais.jfrog.io/artifactory/api/conan/ais-conan --force
- name: Conan create
shell: bash
run: |
REFNAME="${GITHUB_REF#refs/*/}"
VERSION="v$(<version.txt)"
if [[ $GITHUB_REF == refs/tags/* ]] && [[ $REFNAME == $VERSION ]]; then CHANNEL="stable"
elif [[ $REFNAME == master ]]; then CHANNEL="testing"
else
SHORT_REFNAME="${REFNAME:0:40}"
CHANNEL="testing-${SHORT_REFNAME//\//_}"
fi
conan create -s build_type=${{ matrix.build_type }} -b missing . ais/${CHANNEL}
- name: Conan upload
run: conan upload --all --confirm --remote ais 'fmi4cpp*'