Skip to content

Feature/0.4.1

Feature/0.4.1 #3

name: Build and Test - MacOS
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
build:
name: Build flows2fim
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Docker Compose
uses: docker/setup-buildx-action@v3
- name: Run Docker Compose
run: |
docker compose up -d
docker ps
- name: Attach to running container and Build
run: |
CONTAINER_ID=$(docker ps -q | head -n 1)
if [ -n "$CONTAINER_ID" ]; then
docker exec $CONTAINER_ID /bin/bash -c "./scripts/build-darwin-arm64.sh"
docker compose down
else
echo "No running containers found"
exit 1
fi
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: flows2fim
path: builds/darwin-arm64
test:
name: Test flows2fim
runs-on: macos-latest
needs: build
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: flows2fim
path: builds/darwin-arm64
- name: Add flows2fim to PATH
run: |
ls -R builds/darwin-arm64
sudo chmod a+x ./builds/darwin-arm64/flows2fim
./builds/darwin-arm64/flows2fim --version
echo "builds/darwin-arm64" >> $GITHUB_PATH
- name: Install & Configure GDAL
run: |
brew install gdal
- name: Verify gdal installation
run: |
gdalinfo --version
- name: Issue flows2fim controls test cases
run: |
./scripts/test_suite_mac.sh controls
- name: Issue flows2fim fim test cases
run: |
./scripts/test_suite_mac.sh fim