Hyrax 2078 (#1291) #271
This file contains hidden or 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
| # Build the bes for the same architecture as OPeNDAP developer | |
| # machines, to ensure code changes won't break local development | |
| name: OSX CI | |
| on: | |
| # For now, run only on manually triggered builds (workflow_dispatch). | |
| # Uncomment the "push" and "pull_request" to build on all non-draft PRs | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| - /^(.*-test-deploy)$/ | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| concurrency: | |
| # Cancel intermediate builds only on pull requests | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| jobs: | |
| build: | |
| # Run on pushes or non-draft PRs | |
| if: (github.event_name == 'push') || (github.event.pull_request.draft == false) || (github.event_name == 'workflow_dispatch') | |
| name: Build on ${{ matrix.runs-on }} | |
| runs-on: ${{ matrix.runs-on }} | |
| env: | |
| GDAL_OPTION: "--without-gdal" | |
| CMAC_ID: "${{ secrets.AWS_GHA_BES_ID }}" | |
| CMAC_ACCESS_KEY: "${{ secrets.AWS_GHA_BES_SECRET_KEY }}" | |
| CMAC_URL: "https://s3.amazonaws.com/cloudydap/" | |
| CMAC_REGION: "us-east-1" | |
| CMAC_ON: "yes" | |
| LDFLAGS: "-L/opt/homebrew/opt/bison/lib -L/opt/homebrew/opt/jpeg/lib -L/opt/homebrew/opt/openssl/lib" | |
| CPPFLAGS: "-I/opt/homebrew/opt/jpeg/include -I/opt/homebrew/opt/openssl/include" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: | |
| # See https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md for pre-installed software | |
| - macos-15 | |
| - macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install system dependencies | |
| run: | | |
| brew install bison \ | |
| jpeg \ | |
| cppunit \ | |
| autoconf \ | |
| automake \ | |
| libgeotiff \ | |
| libtool \ | |
| groff \ | |
| openssl | |
| shell: bash | |
| - name: Install hyrax-dependencies | |
| run: | | |
| aws s3 cp "s3://opendap.github.actions.build/hyrax-dependencies-${{ matrix.runs-on }}.tgz" $HOME | |
| tar -C $HOME -xzvf $HOME/hyrax-dependencies-${{ matrix.runs-on }}.tgz | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_GHA_BES_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_GHA_BES_SECRET_KEY }} | |
| - name: Update PATH | |
| run: | | |
| export prefix="$HOME/install" | |
| echo -e "$prefix/bin:$prefix/deps/bin:/opt/homebrew/opt/bison/bin:/opt/homebrew/opt/jpeg/bin:$(cat $GITHUB_PATH)" > $GITHUB_PATH | |
| echo "prefix: $prefix" | |
| echo "PATH: $(cat $GITHUB_PATH)" | |
| ls $prefix | |
| shell: bash | |
| - name: Build and install libdap | |
| run: | | |
| # In the future, consider moving this to the libdap repo... | |
| set -x | |
| export prefix="$HOME/install" | |
| git clone https://github.com/opendap/libdap4 | |
| cd libdap4 | |
| autoreconf -fiv | |
| ./configure --prefix=$prefix --enable-developer | |
| make -j16 | |
| make install | |
| ls $prefix | |
| shell: bash | |
| - name: Configure bes build | |
| run: | | |
| set -x | |
| export prefix="$HOME/install" | |
| pwd | |
| autoreconf --force --install --verbose | |
| ./configure --disable-dependency-tracking --prefix=$prefix --with-dependencies=$prefix/deps $GDAL_OPTION --enable-developer | |
| set +x | |
| shell: bash | |
| - name: Build and test bes | |
| id: build-and-test | |
| run: | | |
| set -x | |
| export prefix="$HOME/install" | |
| export LD_LIBRARY_PATH="$prefix/deps/lib:$LD_LIBRARY_PATH" | |
| make -j16 | |
| make install | |
| besctl start | |
| make check -j16 | |
| besctl stop | |
| set +x | |
| shell: bash | |
| continue-on-error: true | |
| - name: Post failure logs to aws | |
| if: steps.build-and-test.outcome == 'failure' | |
| run: | | |
| ./travis/upload-test-results.sh | |
| # Because previous job failed, we need to re-throw failure | |
| # now that logs are uploaded | |
| exit 1 | |
| shell: bash | |
| env: | |
| TRAVIS_JOB_NUMBER: gha-${{ github.run_id }}-${{ github.job }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_GHA_BES_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_GHA_BES_SECRET_KEY }} |