Test Provisioning #351
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- name: Install crystal and tool dependencies | |
run: | | |
brew install crystal meson 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 --verbose \ | |
--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" |