From 55d381e749bbbb176a1d2745c504df5c0e2b7ebb Mon Sep 17 00:00:00 2001 From: Owen Ou Date: Mon, 29 May 2023 10:16:07 -0700 Subject: [PATCH] Fix macos build --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 77 +++++++++++++++++++++++++++++ .github/workflows/osx.yml | 96 ------------------------------------- 3 files changed, 78 insertions(+), 97 deletions(-) create mode 100644 .github/workflows/macos.yml delete mode 100644 .github/workflows/osx.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index dbdfded4a8..addbe31047 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -17,7 +17,7 @@ on: - '!.travis.yml' - '.github/workflows/linux.yml' jobs: - unix: + linux: runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000000..1bef23a9f4 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,77 @@ +name: MacOS Build +on: + push: + branches: + - 'master' + paths: + - '!docs/**' + - '!**.md' + - '!appveyor.yml' + - '!.travis.yml' + - '.github/workflows/macos.yml' + pull_request: + paths: + - '!docs/**' + - '!**.md' + - '!appveyor.yml' + - '!.travis.yml' + - '.github/workflows/macos.yml' +jobs: + macos: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + name: [macos-12-clang, macos-13-clang] + include: + - name: macos-12-clang + os: macos-12 + compiler: clang + - name: macos-13-clang + os: macos-13 + compiler: clang + steps: + - name: Clone repository + uses: actions/checkout@v1 + - name: Open Submodule(s) + run: | + git submodule update --init --recursive + - name: Install packages + run: | + uname -s + brew update + brew install autoconf automake libtool flex bison python3 + sed -i.bak '/^AM_INIT_AUTOMAKE(\[-Wno-portability 1\.14\])$/s/14/11/' modules/oniguruma/configure.ac + - name: Build + env: + CC: ${{ matrix.compiler }} + MAKEVARS: ${{ matrix.makevars }} + run: | + autoreconf -fi + rm src/lexer.c src/lexer.h + rm src/parser.c src/parser.h + ./configure --disable-valgrind --with-oniguruma=builtin YACC="$(brew --prefix)/opt/bison/bin/bison -y" $COVERAGE + make -j4 + make dist + - name: Test + env: + CC: ${{ matrix.compiler }} + MAKEVARS: ${{ matrix.makevars }} + run: | + ulimit -c unlimited + make -j4 check + - name: Test logs + if: ${{ failure() }} + run: | + cat test-suite.log + cat tests/*.log + - name: Upload Install Tarball + uses: actions/upload-artifact@v2 + with: + name: Install Tarball + path: '~/jq-install-osx-${{ matrix.compiler }}.tgz' + - name: Upload Logs Tarball + uses: actions/upload-artifact@v2 + with: + name: Test Logs + path: '~/logs-osx-${{ matrix.compiler }}.tgz' diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml deleted file mode 100644 index 43b2e94f00..0000000000 --- a/.github/workflows/osx.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: OS X Build - -on: - push: - branches: - - 'master' - - 'osx-build' - paths: - - '!docs/**' - - '!**.md' - - '!appveyor.yml' - - '!.travis.yml' - - '.github/workflows/osx.yml' - - pull_request: - paths: - - '!docs/**' - - '!**.md' - - '!appveyor.yml' - - '!.travis.yml' - - '.github/workflows/osx.yml' - -jobs: - unix: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - name: [osx-clang] - include: - - name: osx-clang - os: macos-12 - compiler: clang - cflags: '' - - name: osx-clang - os: macos-13 - compiler: clang - cflags: '' - steps: - - name: Clone repository - uses: actions/checkout@v1 - - name: Open Submodule(s) - run: | - git submodule update --init --recursive - - name: Install packages - run: | - uname -s - brew update - brew install flex bison - brew upgrade pyenv - pyenv install -s 3.6.7 - rm src/{lexer,parser}.{c,h} - sed -i.bak '/^AM_INIT_AUTOMAKE(\[-Wno-portability 1\.14\])$/s/14/11/' modules/oniguruma/configure.ac - - name: Prep - run: | - #pyenv global 3.6.7 - #pip3 install pipenv - #(cd docs && pipenv sync) - #if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi - echo SHELL=$SHELL - echo PATH=$PATH - which bison - bison --version - - - name: Build - env: - CC: ${{ matrix.compiler }} - MAKEVARS: ${{ matrix.makevars }} - run: | - autoreconf -fi - rm src/lexer.c src/lexer.h - rm src/parser.c src/parser.h - ./configure --with-oniguruma=builtin YACC="$(which bison) -y" $COVERAGE - make -j4 - - name: Test - env: - CC: ${{ matrix.compiler }} - MAKEVARS: ${{ matrix.makevars }} - run: | - ulimit -c unlimited - make -j4 check - - name: Test logs - if: ${{ failure() }} - run: | - cat test-suite.log - cat tests/*.log - - name: Upload Install Tarball - uses: actions/upload-artifact@v2 - with: - name: Install Tarball - path: '~/jq-install-osx-${{ matrix.compiler }}.tgz' - - name: Upload Logs Tarball - uses: actions/upload-artifact@v2 - with: - name: Test Logs - path: '~/logs-osx-${{ matrix.compiler }}.tgz'