-
-
Notifications
You must be signed in to change notification settings - Fork 36
90 lines (81 loc) · 2.86 KB
/
build_robostack.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
81
82
83
84
85
86
87
88
89
90
name: Build RoboStack installer
on: [workflow_dispatch]
jobs:
build:
name: ${{ matrix.MINIFORGE_NAME }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
ARCH: x86_64
MINIFORGE_NAME: "rosdesktop"
OS_NAME: "Windows"
- os: macos-latest
ARCH: x86_64
MINIFORGE_NAME: "rosdesktop"
OS_NAME: "MacOSX"
- os: ubuntu-latest
ARCH: aarch64
DOCKER_ARCH: arm64v8
DOCKERIMAGE: condaforge/linux-anvil-aarch64
MINIFORGE_NAME: "rosdesktop"
OS_NAME: "Linux"
- os: ubuntu-latest
ARCH: x86_64
DOCKER_ARCH: amd64
DOCKERIMAGE: condaforge/linux-anvil-cos7-x86_64
MINIFORGE_NAME: "rosdesktop"
OS_NAME: "Linux"
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
if: contains(matrix.OS_NAME, 'Windows')
- name: Build and test miniforge
env:
ARCH: ${{ matrix.ARCH }}
MINIFORGE_NAME: ${{ matrix.MINIFORGE_NAME }}
OS_NAME: ${{ matrix.OS_NAME }}
DOCKERIMAGE: ${{ matrix.DOCKERIMAGE }}
DOCKER_ARCH: ${{ matrix.DOCKER_ARCH }}
run: |
cd constructor_scripts;
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
export MINIFORGE_VERSION=${GITHUB_REF##*/};
fi
if [[ "$OS_NAME" == "Linux" ]]; then
bash build_robostack_installer.sh;
EXT=sh
fi
if [[ "$OS_NAME" == "MacOSX" ]]; then
bash build_robostack_installer_osx.sh;
EXT=sh
fi
if [[ "$OS_NAME" == "Windows" ]]; then
source /c/Miniconda3/Scripts/activate;
source build_robostack_installer_win.sh;
EXT=exe
fi
# Copy for latest release
cp build/$MINIFORGE_NAME-*-$OS_NAME-$ARCH.$EXT build/$MINIFORGE_NAME-$OS_NAME-$ARCH.$EXT
ls -alh build
shell: bash
- name: Upload robostack installer to Github artifact
# if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.MINIFORGE_NAME }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}
path: constructor_scripts/build/${{ matrix.MINIFORGE_NAME }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}*
- name: Upload robostack installer to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: constructor_scripts/build/${{ matrix.MINIFORGE_NAME }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
if: startsWith(github.ref, 'refs/tags/')