-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (84 loc) · 2.79 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build deltaforge
on: [push, pull_request]
jobs:
build:
name: Deltaforge-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
ARCH: x86_64
TARGET_PLATFORM: win-64
OS_NAME: "Windows"
# - os: ubuntu-latest
# ARCH: aarch64
# TARGET_PLATFORM: linux-aarch64
# DOCKER_ARCH: arm64v8
# DOCKERIMAGE: condaforge/linux-anvil-aarch64
# OS_NAME: "Linux"
#
# - os: ubuntu-latest
# ARCH: x86_64
# TARGET_PLATFORM: linux-64
# DOCKER_ARCH: amd64
# DOCKERIMAGE: condaforge/linux-anvil-comp7
# OS_NAME: "Linux"
#
# - os: ubuntu-latest
# ARCH: ppc64le
# TARGET_PLATFORM: linux-ppc64le
# DOCKER_ARCH: ppc64le
# DOCKERIMAGE: condaforge/linux-anvil-ppc64le
# OS_NAME: "Linux"
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@35d1405e78aa3f784fe3ce9a2eb378d5eeb62169
with:
miniconda-version: "latest"
if: contains(matrix.OS_NAME, 'Windows')
- name: Build and test deltaforge
env:
ARCH: ${{ matrix.ARCH }}
OS_NAME: ${{ matrix.OS_NAME }}
DOCKERIMAGE: ${{ matrix.DOCKERIMAGE }}
DOCKER_ARCH: ${{ matrix.DOCKER_ARCH }}
TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }}
run: |
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
export DELTAFORGE_VERSION=${GITHUB_REF##*/};
fi
if [[ "$OS_NAME" == "Linux" ]]; then
export EXT=sh
bash build_deltaforge.sh;
fi
if [[ "$OS_NAME" == "Windows" ]]; then
export EXT=exe
echo "WINDIR:$WINDIR"
source /c/Miniconda3/Scripts/activate;
source build_deltaforge_win.sh;
fi
# Copy for latest release
cp build/Deltaforge-*-$OS_NAME-$ARCH.$EXT build/Deltaforge-$OS_NAME-$ARCH.$EXT
if [[ "$OS_NAME" == "MacOSX" ]]; then
cp build/Deltaforge-*-$OS_NAME-$ARCH.$EXT build/Deltaforge-Darwin-$ARCH.$EXT
fi
ls -alh build
shell: bash
- name: Upload deltaforge to Github artifact
if: always()
uses: actions/upload-artifact@v3
with:
path: build/Deltaforge-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}*
name: Deltaforge-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}
- name: Upload deltaforge to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/Deltaforge*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
if: startsWith(github.ref, 'refs/tags/')