-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (103 loc) · 3.2 KB
/
provision.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 Provisioning
# Provisioning tests are expensive, so we should only run them on main branch
# merges or manually (until later determined to be insufficent)
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '*.hcl'
- '*.md'
schedule:
# Fridays at midnight
- cron: '0 0 * * 5'
workflow_dispatch:
jobs:
macos-provision:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
# TODO: Remove openssl@3 reinstall cmd after 20240422.3 is no longer the latest
# macos-14-arm64 image
- name: Install crystal and tool dependencies
run: |
brew install crystal meson openssl@3
brew update && brew reinstall openssl@3
- name: Install dependencies
run: shards install
- name: Build mstrap
run: make build STATIC=1
# Based on https://raw.githubusercontent.com/MikeMcQuaid/strap/master/.github/workflows/tests.yml
- name: Run brew bot's cleanup
run: brew test-bot --only-cleanup-before
- name: Make macOS like new
run: |
sudo rm -rf /usr/local/bin/brew /usr/local/.??* \
/usr/local/Homebrew /opt/homebrew \
/usr/local/Caskroom \
/Library/Developer/CommandLineTools
- name: Run mstrap
env:
STRAP_CI: true
run: |
bin/mstrap --debug \
--config ${{ secrets.TEST_CONFIG_URL }}
- name: Install required dependencies for ruby
run: |
brew install gmp
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: spec/provisioning
- name: Run serverspecs
env:
BUNDLE_DEPLOYMENT: true
run: |
source ~/.mstrap/env.sh && make check-provisioning
linux-x86_64-smoke-tests:
strategy:
matrix:
test_name:
- archlinux-test
- fedora-38-test
- fedora-39-test
- ubuntu-2204-test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Add Crystal repos
run: curl -sSL https://crystal-lang.org/install.sh | sudo bash
- name: Install crystal and tool dependencies
run: |
sudo apt install -y crystal libevent-dev libpcre2-dev libssl-dev \
curl ninja-build \
ruby ruby-bundler
sudo apt purge meson
sudo pip3 install meson
- name: Install dependencies
run: shards install
- name: Install musl compiler
run: |
curl -O https://more.musl.cc/x86_64-linux-musl/x86_64-linux-musl-cross.tgz
tar xzf x86_64-linux-musl-cross.tgz -C /opt
echo "/opt/x86_64-linux-musl-cross/bin" >> $GITHUB_PATH
- run: x86_64-linux-musl-gcc --version
- name: Build mstrap
run: |
make build STATIC=1 TARGET_CABI=musl
env:
CC_FOR_BUILD: /usr/bin/clang
CXX_FOR_BUILD: /usr/bin/clang++
LD_FOR_BUILD: lld
- name: Run ${{ matrix.test_name }} smoke tests
run: |
make smoke-test \
TEST_NAME=${{ matrix.test_name }} \
TARGET_OS=linux \
TARGET_ARCH=x86_64 \
TARGET_CABI=musl
env:
MSTRAP_FLAGS: "--config ${{ secrets.TEST_CONFIG_URL }} --force"