Skip to content

Build

Build #1001

Workflow file for this run

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 || '' }}