-
-
Notifications
You must be signed in to change notification settings - Fork 18
88 lines (77 loc) · 2.27 KB
/
build.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
name: Build
on:
pull_request:
paths-ignore:
- "**.md"
push:
branches:
- main
paths-ignore:
- "**.md"
schedule:
- cron: "0 0 * * 0" # weekly at midnight on sundays (ish)
env:
ASDF_CONCURRENCY: 2
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
# - windows-latest In theory this should work, but ASDF requires bash and friends
python-version:
- "3.8"
- "3.11"
cli-version:
- "latest:1"
- "latest:2"
- "source"
include:
- os: macos-latest
coreutils:
- default
- latest
runs-on: ${{ matrix.os }}
steps:
- name: Setup homebrew if using latest coreutils
if: matrix.coreutils == 'latest'
uses: Homebrew/actions/setup-homebrew@master
- name: Try installing latest GNU coreutils
if: matrix.coreutils == 'latest'
run: |
brew update
brew install coreutils
echo "$(brew --prefix)/opt/coreutils/libexec/gnubin" >> "${GITHUB_PATH}"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Check paths and coreutils version if using latest
if: matrix.coreutils == 'latest'
run: |
which cp
cp --version
which python
python --version
"${pythonLocation}/bin/python" --version
echo "${GITHUB_PATH}"
echo "${PATH}"
- name: asdf_plugin_test
uses: asdf-vm/actions/plugin-test@v2
with:
command: aws --version
version: ${{ matrix.cli-version }}
- name: Retrieve latest version (source)
if: matrix.cli-version == 'source'
run: |
echo "AWSCLI_VERSION=ref:$(asdf latest awscli 2)" >> "${GITHUB_ENV}"
- name: Retrieve latest version (binary)
if: matrix.cli-version != 'source'
run: |
echo "AWSCLI_VERSION=$(asdf latest awscli 2)" >> "${GITHUB_ENV}"
- name: asdf_plugin_test
uses: asdf-vm/actions/plugin-test@v2
with:
command: aws --version
version: ${{ env.AWSCLI_VERSION || '' }}