Split out 2nd swift-t test #51
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: Build and Test 🧪 | |
on: | |
# Schedule and workflow_dispatch (manual) only work on default branch | |
schedule: | |
- cron: "0 6 * * *" # Fire at 06:00 AM every day | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- github_action_mac | |
# - github_action_build # The name of our test branch | |
# - master | |
release: | |
types: | |
- published | |
permissions: | |
contents: read # To read the project source code (git) | |
# packages: read # To read the docker image from package registry | |
jobs: | |
build_swift-t: | |
name: Swift/T OS=${{ matrix.os }} PY=${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
# - ubuntu-latest | |
- macos-14 | |
# - macos-14-arm64 | |
# Comma separated list of python versions to test | |
python-version: ["3.11"] # "3.9", | |
mpi: | |
- mpich | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install deps | |
run: | | |
dev/github-actions/setup-${{ matrix.os }}.sh | |
# - name: Set up R | |
# uses: r-lib/actions/setup-r@v2 | |
# # TODO RInside | |
# - name: Install R requirements | |
# run: R -e "install.packages('RInside')" | |
# # run: Rscript install/R-requirements.R | |
# - uses: r-lib/actions/setup-r-dependencies@v2 | |
# with: | |
# extra-packages: any::RInside | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# - name: Upgrade pip | |
# run: python -m pip install -U pip | |
- name: Initialize swift-t settings (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
dev/build/init-settings.sh | |
sed -i 's/ENABLE_PYTHON=0/ENABLE_PYTHON=1/g' dev/build/swift-t-settings.sh | |
- name: Initialize swift-t settings (Mac) | |
if: startsWith(matrix.os, 'macos-14') | |
run: | | |
dev/build/init-settings.sh | |
# Add GNU tools to PATH [HERE] | |
sed -i '' 's/ENABLE_PYTHON=0/ENABLE_PYTHON=1/g' dev/build/swift-t-settings.sh | |
# Only effective on MacOS/Homebrew systems: | |
# echo 'PATH=/opt/homebrew/opt/make/libexec/gnubin:$PATH' >> dev/build/swift-t-settings.sh | |
# ls /opt/homebrew/opt/make/libexec/gnubin | |
which make gmake | |
which make gmake sed | |
# TODO set swift-t install, R, python, and ?? | |
# sed -i 's/original/new/g' file.txt | |
# - run: | |
# - run: sed -i 's/ENABLE_R=0/ENABLE_R=1/g' dev/build/swift-t-settings.sh | |
- name: build swift-t | |
run: | | |
dev/build/build-swift-t.sh -vv | |
- name: Report Swift/T version info | |
run: /tmp/swift-t-install/stc/bin/swift-t -v | |
- name: Check that Swift/T runs | |
run: /tmp/swift-t-install/stc/bin/swift-t -E 'trace(42);' |