<commit_before>name: C/C++ CI

on: [push, pull_request]

jobs:
  Linux:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: install dependencies
      run: sudo apt-get install g++-8 autoconf-archive curl zlib1g-dev
    - name: install liblo
      run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz && tar -xzf liblo-0.31.tar.gz && cd liblo-0.31 && (./configure --host=$HOST --prefix=$PWD/inst --enable-static --disable-tests --disable-tools --disable-examples || (cat config.log; false)) && make install && find inst && cd ..
    - name: autogen
      run:
        pwd
        && mkdir $PWD/inst
        && env NOCONFIGURE=1 am_opt=--copy ./autogen.sh
        && (./configure --enable-static --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
    - name: make
      run: make && (make check || (for i in src/*.log; do echo === $i ===; cat $i; done; false)) && make install && find inst
    - name: make tests
      run: cd test && make tests
    - name: make dist
      run: make dist
    - name: python wheels
      run:
        pwd && make distclean && bindings/python/build_wheels.py
    - uses: actions/upload-artifact@v2
      with:
        path: |
          libmapper*.tar.gz
          ./wheelhouse/*.whl

  MacOS-Latest:
    runs-on: macOS-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: install dependencies
      run: brew install autoconf-archive automake
    - name: install liblo
      run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz && tar -xzf liblo-0.31.tar.gz && cd liblo-0.31 && (./configure --host=$HOST --prefix=$PWD/inst --enable-static --disable-shared --disable-tests --disable-tools --disable-examples CFLAGS=-fPIC || (cat config.log; false)) && make install && find inst && cd ..
    - name: autogen
      run: pwd && mkdir $PWD/inst && (./autogen.sh --enable-static --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
    - name: make
      run: make && (make check || (for i in src/*.log; do echo === $i ===; cat $i; done; false)) && make install && find inst
    - name: make tests
      run: cd test && make tests
    - name: python wheels
      run:
        cp -v $PWD/inst/lib/libmapper.*.dylib bindings/python/libmapper/libmapper.dylib
        && pip3 wheel bindings/python -w ./wheelhouse
        && unzip -t wheelhouse/*.whl
    - uses: actions/upload-artifact@v2
      with:
        path: ./wheelhouse/*.whl

  MacOS-10:
    runs-on: macOS-10.15
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: install dependencies
      run: brew install autoconf-archive automake
    - name: install liblo
      run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz && tar -xzf liblo-0.31.tar.gz && cd liblo-0.31 && (./configure --host=$HOST --prefix=$PWD/inst --enable-static --disable-shared --disable-tests --disable-tools --disable-examples CFLAGS=-fPIC || (cat config.log; false)) && make install && find inst && cd ..
    - name: autogen
      run: pwd && mkdir $PWD/inst && (./autogen.sh --enable-static --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
    - name: make
      run: make && (make check || (for i in src/*.log; do echo === $i ===; cat $i; done; false)) && make install && find inst
    - name: make tests
      run: cd test && make tests
    - name: python wheels
      run:
        cp -v $PWD/inst/lib/libmapper.*.dylib bindings/python/libmapper/libmapper.dylib
        && pip3 wheel bindings/python -w ./wheelhouse
        && unzip -t wheelhouse/*.whl
    - uses: actions/upload-artifact@v2
      with:
        path: ./wheelhouse/*.whl

  MinGW:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: install dependencies
      run: sudo apt-get install g++-mingw-w64 autoconf-archive curl
    - name: install liblo
      run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz && tar -xzf liblo-0.31.tar.gz && cd liblo-0.31 && (./configure --host="x86_64-w64-mingw32" --prefix=$PWD/inst --disable-tests --disable-tools --disable-examples || (cat config.log; false)) && make install && find inst && cd ..
    - name: install zlib
      run: unset CC && unset CXX && curl -L -O http://www.zlib.net/zlib-1.2.11.tar.gz && tar -xzf zlib-1.2.11.tar.gz && cp -v zlib-1.2.11/crc32.c src/ && echo libmapper_la_SOURCES += crc32.c >>src/Makefile.am && echo libmapper_la_CFLAGS += -I\$\(top_srcdir\)/zlib-1.2.11 >>src/Makefile.am && sed -e 's,\(AC_CHECK_LIB(\[z\]\),dnl \1,' -i configure.ac && sed -e 's,\(\./\$\$i\),wine \1.exe,' -i test/Makefile.am
    - name: autogen
      run: pwd && mkdir $PWD/inst && (./autogen.sh --host="x86_64-w64-mingw32" --enable-static --disable-python --disable-jni --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
    - name: make
      run: make && make install && find inst
    - name: python wheels
      run:
        cp -v $PWD/inst/bin/libmapper-*.dll bindings/python/libmapper/libmapper.dll
        && pip3 wheel bindings/python -w ./wheelhouse
        && unzip -t wheelhouse/*.whl
        && mv -v wheelhouse/*.whl $(echo wheelhouse/*.whl | sed -e s/-any./-win32./)
    - uses: actions/upload-artifact@v2
      with:
        path: ./wheelhouse/*.whl
<commit_msg>Build liblo and libmapper as universal binaries in macOS CI script.<commit_after>name: C/C++ CI

on: [push, pull_request]

jobs:
  Linux:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: install dependencies
      run: sudo apt-get install g++-8 autoconf-archive curl zlib1g-dev
    - name: install liblo
      run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz && tar -xzf liblo-0.31.tar.gz && cd liblo-0.31 && (./configure --host=$HOST --prefix=$PWD/inst --enable-static --disable-tests --disable-tools --disable-examples || (cat config.log; false)) && make install && find inst && cd ..
    - name: autogen
      run:
        pwd
        && mkdir $PWD/inst
        && env NOCONFIGURE=1 am_opt=--copy ./autogen.sh
        && (./configure --enable-static --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
    - name: make
      run: make && (make check || (for i in src/*.log; do echo === $i ===; cat $i; done; false)) && make install && find inst
    - name: make tests
      run: cd test && make tests
    - name: make dist
      run: make dist
    - name: python wheels
      run:
        pwd && make distclean && bindings/python/build_wheels.py
    - uses: actions/upload-artifact@v2
      with:
        path: |
          libmapper*.tar.gz
          ./wheelhouse/*.whl

  MacOS-Latest:
    runs-on: macOS-latest
    env:
      CC: clang
      CXX: clang++
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: install dependencies
      run: brew install autoconf-archive automake
    - name: download liblo
      run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz && tar -xzf liblo-0.31.tar.gz
    - name: liblo make arm64
      run:
        cd ./liblo-0.31
        && pwd
        && (./configure CFLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --target=arm64-apple-darwin -fPIC" CXXFLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --target=arm64-apple-darwin" --build=x86_64-apple-darwin19.6.0 --host=aarch64-apple-darwin --enable-static --prefix=$PWD/inst --disable-shared --disable-tests --disable-tools --disable-examples || (cat config.log; false))
        && make install
        && mv ./inst/lib/liblo.a ./inst/lib/liblo.a.arm64
        && cd ..
    - name: liblo make x86_64
      run:
        cd ./liblo-0.31
        && pwd
        && make clean
        && (./configure --host=$HOST --prefix=$PWD/inst --enable-static --disable-shared --disable-tests --disable-tools --disable-examples CFLAGS=-fPIC || (cat config.log; false))
        && make install
        && mv ./inst/lib/liblo.a ./inst/lib/liblo.a.x86_64
        && cd ..
    - name: liblo universal binary
      run: cd ./liblo-0.31/inst/lib && lipo -create -output ./liblo.a ./liblo.a.arm64 ./liblo.a.x86_64 && lipo -info ./liblo.a && rm ./liblo.a.* && cd ../../..
    - name: libmapper autogen arm64
      run:
        pwd
        && mkdir $PWD/inst
        && (./autogen.sh CFLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --target=arm64-apple-darwin" CXXFLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --target=arm64-apple-darwin" --build=x86_64-apple-darwin19.6.0 --host=aarch64-apple-darwin --enable-static --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
    - name: libmapper make arm64 part 1
      continue-on-error: true
      run:
        make install
    - name: libmapper make arm64 part 2
      run:
        cd ./src/.libs
        && clang -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --target=arm64-apple-darwin -o libmapper.9.dylib libmapper_la-device.o libmapper_la-expression.o libmapper_la-graph.o libmapper_la-link.o libmapper_la-list.o libmapper_la-map.o libmapper_la-network.o libmapper_la-object.o libmapper_la-properties.o libmapper_la-router.o libmapper_la-signal.o libmapper_la-slot.o libmapper_la-table.o libmapper_la-time.o libmapper_la-value.o -L/Users/runner/work/libmapper/libmapper/liblo-0.31/inst/lib /Users/runner/work/libmapper/libmapper/liblo-0.31/inst/lib/liblo.a -lz -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -install_name /Users/runner/work/libmapper/libmapper/inst/lib/libmapper.9.dylib -compatibility_version 10 -current_version 10.0 -Wl,-single_module
        && cd ../..
        && mv ./src/.libs/libmapper.9.dylib ./inst/lib/libmapper.9.dylib.arm64
        && file ./inst/lib/libmapper.9.dylib.arm64
        && mv ./inst/lib/libmapper.a ./inst/lib/libmapper.a.arm64
        && lipo -info ./inst/lib/libmapper.a.arm64
    - name: libmapper autogen x86_64
      run:
        make clean
        && (./autogen.sh --enable-static --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
    - name: libmapper make x86_64
      run:
        make
        && (make check || (for i in src/*.log; do echo === $i ===; cat $i; done; false))
        && make install
        && mv ./inst/lib/libmapper.9.dylib ./inst/lib/libmapper.9.dylib.x86_64
        && file ./inst/lib/libmapper.9.dylib.x86_64
        && mv ./inst/lib/libmapper.a ./inst/lib/libmapper.a.x86_64
        && lipo -info ./inst/lib/libmapper.a.x86_64
    - name: libmapper universal binary
      run:
        pwd
        && find inst
        && cd ./inst/lib
        && lipo -create -output ./libmapper.a ./libmapper.a.arm64 ./libmapper.a.x86_64
        && lipo -info ./libmapper.a
        && rm ./libmapper.a.*
        && file ./libmapper.9.dylib.arm64
        && file ./libmapper.9.dylib.x86_64
        && lipo -create -output ./libmapper.9.dylib ./libmapper.9.dylib.arm64 ./libmapper.9.dylib.x86_64
        && file ./libmapper.9.dylib
        && rm ./libmapper.9.dylib.*
        && cd ../..
    - name: make tests
      run: cd test && make tests
    - name: python wheels
      run:
        cp -v $PWD/inst/lib/libmapper.*.dylib bindings/python/libmapper/libmapper.dylib
        && pip3 wheel bindings/python -w ./wheelhouse
        && unzip -t wheelhouse/*.whl
    - uses: actions/upload-artifact@v2
      with:
        path: ./wheelhouse/*.whl

  MacOS-10:
    runs-on: macOS-10.15
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: install dependencies
      run: brew install autoconf-archive automake
    - name: install liblo
      run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz && tar -xzf liblo-0.31.tar.gz && cd liblo-0.31 && (./configure --host=$HOST --prefix=$PWD/inst --enable-static --disable-shared --disable-tests --disable-tools --disable-examples CFLAGS=-fPIC || (cat config.log; false)) && make install && find inst && cd ..
    - name: autogen
      run: pwd && mkdir $PWD/inst && (./autogen.sh --enable-static --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
    - name: make
      run: make && (make check || (for i in src/*.log; do echo === $i ===; cat $i; done; false)) && make install && find inst
    - name: make tests
      run: cd test && make tests
    - name: python wheels
      run:
        cp -v $PWD/inst/lib/libmapper.*.dylib bindings/python/libmapper/libmapper.dylib
        && pip3 wheel bindings/python -w ./wheelhouse
        && unzip -t wheelhouse/*.whl
    - uses: actions/upload-artifact@v2
      with:
        path: ./wheelhouse/*.whl

  MinGW:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: install dependencies
      run: sudo apt-get install g++-mingw-w64 autoconf-archive curl
    - name: install liblo
      run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz && tar -xzf liblo-0.31.tar.gz && cd liblo-0.31 && (./configure --host="x86_64-w64-mingw32" --prefix=$PWD/inst --disable-tests --disable-tools --disable-examples || (cat config.log; false)) && make install && find inst && cd ..
    - name: install zlib
      run: unset CC && unset CXX && curl -L -O http://www.zlib.net/zlib-1.2.11.tar.gz && tar -xzf zlib-1.2.11.tar.gz && cp -v zlib-1.2.11/crc32.c src/ && echo libmapper_la_SOURCES += crc32.c >>src/Makefile.am && echo libmapper_la_CFLAGS += -I\$\(top_srcdir\)/zlib-1.2.11 >>src/Makefile.am && sed -e 's,\(AC_CHECK_LIB(\[z\]\),dnl \1,' -i configure.ac && sed -e 's,\(\./\$\$i\),wine \1.exe,' -i test/Makefile.am
    - name: autogen
      run: pwd && mkdir $PWD/inst && (./autogen.sh --host="x86_64-w64-mingw32" --enable-static --disable-python --disable-jni --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
    - name: make
      run: make && make install && find inst
    - name: python wheels
      run:
        cp -v $PWD/inst/bin/libmapper-*.dll bindings/python/libmapper/libmapper.dll
        && pip3 wheel bindings/python -w ./wheelhouse
        && unzip -t wheelhouse/*.whl
        && mv -v wheelhouse/*.whl $(echo wheelhouse/*.whl | sed -e s/-any./-win32./)
    - uses: actions/upload-artifact@v2
      with:
        path: ./wheelhouse/*.whl

{'fraction_non_alphanumeric': 0.16346153846153846, 'fraction_numerical': 0.026425497579343732, 'mean_word_length': 2.3243182834152885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 15, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3184931', 'n_tokens_mistral': 5582, 'n_tokens_neox': 5337, 'n_words': 1173}