Skip to content

Commit

Permalink
Merge branch 'ci-macos-14'
Browse files Browse the repository at this point in the history
Run GitHub Actions Mac CI jobs under macos-14.

See #1171.
  • Loading branch information
vadz committed Oct 16, 2024
2 parents 8d9b3f6 + 90f1d3c commit 57df691
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ on:
- .cirrus.yml
- .github/workflows/codeql.yml
- appveyor.yml
workflow_dispatch:
inputs:
enable_ssh:
type: boolean
description: 'Enable ssh server before running the job'
required: false
default: false

jobs:
build:
Expand All @@ -32,7 +39,7 @@ jobs:
# Note: the jobs are ordered in the order of decreasing running
# time, as this should minimize the total run-time of all jobs.
- backend: postgresql
runner: macos-12
runner: macos-14
name: PostgreSQL macOS
- backend: oracle
name: Oracle 11
Expand All @@ -50,15 +57,15 @@ jobs:
- backend: mysql
name: MySQL
- backend: sqlite3
runner: macos-12
runner: macos-14
name: SQLite3 macOS
- backend: sqlite3
name: SQLite3 C++17
cxxstd: 17
- backend: sqlite3
name: SQLite3
- backend: empty
runner: macos-12
runner: macos-14
name: Empty macOS
- backend: empty
name: Empty
Expand Down Expand Up @@ -116,7 +123,7 @@ jobs:
;;
macOS)
set_env_var PGDATA /usr/local/var/postgres
set_env_var PGDATA /opt/homebrew/var/postgresql@14
;;
esac
Expand All @@ -141,8 +148,11 @@ jobs:
set_env_var BUILD_EXAMPLES YES
fi
- name: Install dependencies under Linux
if: runner.os == 'Linux'
- name: Setup tmate
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.enable_ssh }}

- name: Install dependencies
run: ./scripts/ci/install.sh

- name: Prepare for build
Expand Down
1 change: 0 additions & 1 deletion scripts/ci/before_build_postgresql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ case "$(uname)" in
;;

Darwin)
pg_ctl init
pg_ctl start
pg_isready --timeout=60
createuser --superuser postgres
Expand Down
13 changes: 13 additions & 0 deletions scripts/ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ case "$(uname)" in
FreeBSD)
pkg install -q -y bash cmake
;;

Darwin)
case "${SOCI_CI_BACKEND}" in
postgresql)
brew install postgresql
;;
esac
;;

*)
echo "Unknown platform: $(uname)"
exit 1
;;
esac

install_script="${SOCI_SOURCE_DIR}/scripts/ci/install_${SOCI_CI_BACKEND}.sh"
Expand Down

0 comments on commit 57df691

Please sign in to comment.