forked from dynawo/dynawo
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (57 loc) · 3.62 KB
/
release.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
name: Release
on:
release:
types: [published]
jobs:
distribution-cxx11:
name: Distribution Linux cxx11
runs-on: ubuntu-latest
container: dynawo/dynawo-distribution-cxx11:latest
env:
DYNAWO_BUILD_TYPE: Release
DYNAWO_COMPILER: GCC
DYNAWO_FORCE_CXX11_ABI: "true"
DYNAWO_RESULTS_SHOW: "false"
DYNAWO_NB_PROCESSORS_USED: 2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout sources
uses: actions/checkout@v1
- name: Build
env:
DYNAWO_INSTALL_OPENMODELICA: ${{ runner.workspace }}/OpenModelica/Install
DYNAWO_SRC_OPENMODELICA: ${{ runner.workspace }}/OpenModelica/Source
run: |
export DYNAWO_HOME=$(pwd)
util/envDynawo.sh build-user
util/envDynawo.sh distrib
util/envDynawo.sh distrib-headers
util/envDynawo.sh distrib-omc
version=$(util/envDynawo.sh version | cut -f1 -d' ')
curl -H "authorization: Bearer $GITHUB_TOKEN" -H "Content-Type: application/zip" -X POST $(curl -s -H "authorization: Bearer $GITHUB_TOKEN" --request GET https://api.github.com/repos/FredericSabot/dynawo/releases/latest | grep upload_url | cut -d '"' -f 4 | grep -o ".*assets")?name=Dynawo_Linux_v${version}.zip --data-binary @distributions/Dynawo_omc_V${version}.zip
curl -H "authorization: Bearer $GITHUB_TOKEN" -H "Content-Type: application/zip" -X POST $(curl -s -H "authorization: Bearer $GITHUB_TOKEN" --request GET https://api.github.com/repos/FredericSabot/dynawo/releases/latest | grep upload_url | cut -d '"' -f 4 | grep -o ".*assets")?name=Dynawo_Linux_minimal_v${version}.zip --data-binary @distributions/Dynawo_V${version}.zip
curl -H "authorization: Bearer $GITHUB_TOKEN" -H "Content-Type: application/zip" -X POST $(curl -s -H "authorization: Bearer $GITHUB_TOKEN" --request GET https://api.github.com/repos/FredericSabot/dynawo/releases/latest | grep upload_url | cut -d '"' -f 4 | grep -o ".*assets")?name=Dynawo_Linux_headers_v${version}.zip --data-binary @distributions/Dynawo_headers_V${version}.zip
curl -H "authorization: Bearer $GITHUB_TOKEN" -H "Content-Type: application/zip" -X POST $(curl -s -H "authorization: Bearer $GITHUB_TOKEN" --request GET https://api.github.com/repos/FredericSabot/dynawo/releases/latest | grep upload_url | cut -d '"' -f 4 | grep -o ".*assets")?name=Dynawo_Modelica_Library_v${version}.zip --data-binary @distributions/Dynawo_Modelica_library_V${version}.zip
distribution-centos7:
name: Distribution Linux centos7
runs-on: ubuntu-latest
container: dynawo/dynawo-distribution-centos7:latest
env:
DYNAWO_BUILD_TYPE: Release
DYNAWO_COMPILER: GCC
DYNAWO_RESULTS_SHOW: "false"
DYNAWO_NB_PROCESSORS_USED: 2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout sources
uses: actions/checkout@v1
- name: Build
env:
DYNAWO_INSTALL_OPENMODELICA: ${{ runner.workspace }}/OpenModelica/Install
DYNAWO_SRC_OPENMODELICA: ${{ runner.workspace }}/OpenModelica/Source
run: |
export DYNAWO_HOME=$(pwd)
util/envDynawo.sh build-user
util/envDynawo.sh distrib-omc
version=$(util/envDynawo.sh version | cut -f1 -d' ')
curl -H "authorization: Bearer $GITHUB_TOKEN" -H "Content-Type: application/zip" -X POST $(curl -s -H "authorization: Bearer $GITHUB_TOKEN" --request GET https://api.github.com/repos/FredericSabot/dynawo/releases/latest | grep upload_url | cut -d '"' -f 4 | grep -o ".*assets")?name=Dynawo_Linux_centos7_v${version}.zip --data-binary @distributions/Dynawo_omc_V${version}.zip