-
Notifications
You must be signed in to change notification settings - Fork 240
125 lines (121 loc) · 3.28 KB
/
test_install.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Test Installation
on:
pull_request:
paths:
- '.github/workflows/test_install.yml'
- 'installers/**'
push:
branches:
- master
workflow_dispatch:
jobs:
test-docker:
strategy:
fail-fast: false
max-parallel: 4
matrix:
image:
- "ubuntu:20.04"
- "ubuntu:22.04"
- "ubuntu:23.04"
- "debian:oldstable-slim"
- "debian:stable-slim"
- "alpine:latest"
- "archlinux:latest"
- "amazonlinux:latest"
runs-on: ubuntu-latest
env:
SHELL: /bin/bash
# FLYCTL_INSTALL: /usr/local/bin
container:
image: ${{ matrix.image }}
options: --user root
steps:
- name: Install Dependencies (apt-get)
if: |
contains(matrix.image, 'ubuntu') ||
contains(matrix.image, 'debian')
run: |
apt-get update && apt-get install -y curl
- name: Install Dependencies (apk)
if: |
contains(matrix.image, 'alpine')
run: |
apk --no-cache add curl
- name: Install Dependencies (yum)
if: |
contains(matrix.image, 'amazonlinux')
# actions/checkout needs tar & gzip, so install them too
run: yum install -y --allowerasing tar gzip curl
- name: checkout
uses: actions/checkout@v4
- name: run installer
run: |
echo "$HOME/.fly/bin" >> $GITHUB_PATH
sh ./installers/install.sh
- name: check that `flyctl` binary is installed
run: flyctl version
- name: check that `fly` symlink is installed
run: fly version
# TODO[md]: this is currently broken on stable. restore once fixed.
# - name: Check that the install config was saved
# run: |
# grep -x -q "channel: stable" ~/.fly/state.yml
test-native:
strategy:
fail-fast: false
max-parallel: 4
matrix:
os:
- ubuntu-latest
- ubuntu-20.04
- macos-latest
- macos-12
- macos-13
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Install (macOS/Linux)
run: |
echo "$HOME/.fly/bin" >> $GITHUB_PATH
sh ./installers/install.sh
- name: Check that `flyctl` works
run: flyctl version
- name: Check that `fly` works
run: fly version
# TODO[md]: this is currently broken on the latest stable releases. restore once fixed.
# - name: Check that the install config was saved
# run: |
# grep -x -q "channel: stable" ~/.fly/state.yml
test-windows:
strategy:
fail-fast: false
max-parallel: 4
matrix:
os:
- windows-latest
- windows-2019
runs-on: ${{ matrix.os }}
env:
FLYCTL_INSTALL: "C:\\flyctl"
steps:
- name: checkout
uses: actions/checkout@v4
- name: Install
shell: powershell
run: |
./installers/install.ps1
- name: Set Path
run: |
echo "$env:FLYCTL_INSTALL\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: env
shell: powershell
- run: ls $env:FLYCTL_INSTALL\bin
shell: powershell
- name: Check that `flyctl` works
shell: powershell
run: flyctl version
- name: Check that `fly` works
shell: powershell
run: fly version