-
Notifications
You must be signed in to change notification settings - Fork 9
97 lines (74 loc) · 2.86 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
89
90
91
92
93
94
95
96
97
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Build
on:
push:
branches: # build all branches
- '**'
tags-ignore: # but don't build tags
- '**'
paths-ignore:
- '**/*.adoc'
- '**/*.md'
- '.github/*.yml'
pull_request:
paths-ignore:
- '**/*.adoc'
- '**/*.md'
workflow_dispatch:
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix: # https://github.com/actions/runner-images#available-images
include:
- { os: ubuntu-24.04, experimental: false }
- { os: ubuntu-22.04, experimental: false }
- { os: ubuntu-20.04, experimental: false }
- { os: macos-14, experimental: false } # ARM
- { os: macos-13, experimental: false } # x86
steps:
- name: Git Checkout
uses: actions/checkout@v4 #https://github.com/actions/checkout
- name: "Show: environment variables"
run: env | sort
- name: "Show: Bash version"
run: bash --version
- name: "Show: POSIX memory limit"
run: getconf ARG_MAX
- name: "Linux: Configure APT"
if: startsWith(matrix.os, 'ubuntu')
run: |
# Workaround to avoid sporadic connectivity issues "Could not connect to azure.archive.ubuntu.com:80"
# see https://github.com/actions/virtual-environments/issues/675
echo 'APT::Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-acquire-retries
if ! curl --max-time 3 --output /dev/null --silent --head --fail "http://azure.archive.ubuntu.com/ubuntu/dists/"; then
sudo sed -i 's/azure\.//' /etc/apt/sources.list
fi
echo 'APT::Install-Recommends "0";' | sudo tee /etc/apt/apt.conf.d/01-norecommends
echo 'APT::Install-Suggests "0";' | sudo tee -a /etc/apt/apt.conf.d/01-norecommends
# avoid potential 404 see https://github.com/actions/runner-images/issues/592
sudo apt-get update
- name: "Linux: Install required packages"
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get --no-install-recommends install -y bc rng-tools xxd
- name: "MacOS: Update brew formulas"
if: runner.os == 'macOS'
run: |
set -eu
echo "::group::brew update" && brew update && echo "::endgroup::"
echo "::group::brew config" && brew config && echo "::endgroup::"
echo "::group::brew list" && brew list --version && echo "::endgroup::"
- name: "MacOS: Install coreutils, ioping"
if: startsWith(matrix.os, 'macos')
run: brew install coreutils ioping
- name: Test bash-funk
shell: bash
env:
TERM: xterm
run: |
source bash-funk.sh
source modules/test.sh
-test-all