From e2f34c39962749dc48622a485e6a1687995e1c18 Mon Sep 17 00:00:00 2001 From: Ioannis Tsakpinis Date: Sat, 5 Nov 2022 22:57:50 +0200 Subject: [PATCH] LWJGL configuration --- .github/dependabot.yml | 10 -- .github/workflows/arm-ci.yml | 25 --- .github/workflows/cifuzz.yml | 28 --- .github/workflows/configs-build.yml | 27 --- .github/workflows/coverity-scan.yml | 42 ----- .github/workflows/linux-ci.yml | 71 -------- .github/workflows/lwjgl.yml | 264 ++++++++++++++++++++++++++++ .github/workflows/macos-ci.yml | 60 ------- .github/workflows/msvc-ci.yml | 61 ------- .github/workflows/msys2-ci.yml | 82 --------- .github/workflows/scorecard.yml | 64 ------- lwjgl_linux_arm32.cross | 12 ++ lwjgl_linux_arm64.cross | 12 ++ lwjgl_linux_ppc64le.cross | 12 ++ lwjgl_linux_riscv64.cross | 12 ++ lwjgl_macos_arm64.cross | 21 +++ lwjgl_windows_arm64.cross | 12 ++ src/meson.build | 7 +- subprojects/freetype2.wrap | 10 +- 19 files changed, 354 insertions(+), 478 deletions(-) delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/arm-ci.yml delete mode 100644 .github/workflows/cifuzz.yml delete mode 100644 .github/workflows/configs-build.yml delete mode 100644 .github/workflows/coverity-scan.yml delete mode 100644 .github/workflows/linux-ci.yml create mode 100644 .github/workflows/lwjgl.yml delete mode 100644 .github/workflows/macos-ci.yml delete mode 100644 .github/workflows/msvc-ci.yml delete mode 100644 .github/workflows/msys2-ci.yml delete mode 100644 .github/workflows/scorecard.yml create mode 100644 lwjgl_linux_arm32.cross create mode 100644 lwjgl_linux_arm64.cross create mode 100644 lwjgl_linux_ppc64le.cross create mode 100644 lwjgl_linux_riscv64.cross create mode 100644 lwjgl_macos_arm64.cross create mode 100644 lwjgl_windows_arm64.cross diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 8725672a163f..000000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - - package-ecosystem: "pip" - directory: "/.ci" - schedule: - interval: "weekly" diff --git a/.github/workflows/arm-ci.yml b/.github/workflows/arm-ci.yml deleted file mode 100644 index 4a20ad51257e..000000000000 --- a/.github/workflows/arm-ci.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: arm - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -permissions: - contents: read - -jobs: - arm-none-eabi: - runs-on: ubuntu-22.04 - container: - image: devkitpro/devkitarm:latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Configure CMake - run: | - cmake -S . -B build \ - -DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake - - name: Build - run: make CXX_FLAGS="-w -DHB_NO_MT" - working-directory: build diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml deleted file mode 100644 index f3dd5873ae18..000000000000 --- a/.github/workflows/cifuzz.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: CIFuzz -on: [pull_request] - -permissions: - contents: read - -jobs: - Fuzzing: - runs-on: ubuntu-latest - steps: - - name: Build Fuzzers - id: build - uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master - with: - oss-fuzz-project-name: 'harfbuzz' - dry-run: false - - name: Run Fuzzers - uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master - with: - oss-fuzz-project-name: 'harfbuzz' - fuzz-seconds: 600 - dry-run: false - - name: Upload Crash - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - if: failure() && steps.build.outcome == 'success' - with: - name: artifacts - path: ./out/artifacts diff --git a/.github/workflows/configs-build.yml b/.github/workflows/configs-build.yml deleted file mode 100644 index 3034df3c5964..000000000000 --- a/.github/workflows/configs-build.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: configs-ci - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: install dependencies - run: sudo apt-get install gcc - - name: HB_DISABLE_DEPRECATED - run: g++ -std=c++11 -c src/harfbuzz.cc -DHB_DISABLE_DEPRECATED - - name: HB_MINI - run: g++ -std=c++11 -c src/harfbuzz.cc -DHB_MINI - - name: HB_LEAN - run: g++ -std=c++11 -c src/harfbuzz.cc -DHB_LEAN - - name: HB_TINY - run: g++ -std=c++11 -c src/harfbuzz.cc -DHB_TINY diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml deleted file mode 100644 index eed2984f40da..000000000000 --- a/.github/workflows/coverity-scan.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: coverity-scan - -on: - schedule: - - cron: '0 10 * * *' # Daily at 10:00 UTC - -permissions: - contents: read - -jobs: - latest: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - run: sudo apt-get install gcc clang wget git curl pkg-config libfreetype6-dev libglib2.0-dev libicu-dev libgraphite2-dev - - - name: Download Coverity - run: | - wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=HarfBuzz" -O cov-analysis-linux64.tar.gz - mkdir cov-analysis-linux64 - tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 - env: - TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} - - # ideally we should've used meson and ninja here but it complains about coverage or something - - run: cov-analysis-linux64/bin/cov-build --dir cov-int clang src/hb-*.cc -DHAVE_FREETYPE -DHAVE_GRAPHITE2 -DHAVE_GLIB -DHAVE_ICU `pkg-config --cflags freetype2 graphite2 glib-2.0 icu-uc` -DHAVE_ROUNDF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H -DHAVE_GETPAGESIZE -DHB_EXPERIMENTAL_API -c - - - run: tar czvf harfbuzz.tgz cov-int - - - name: submit to coverity - run: | - curl \ - --form project=HarfBuzz \ - --form token=$TOKEN \ - --form email=harfbuzz-bots-chatter@googlegroups.com \ - --form file=@harfbuzz.tgz \ - --form version=trunk \ - --form description="`git rev-parse --short HEAD`" \ - https://scan.coverity.com/builds?project=HarfBuzz - env: - TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml deleted file mode 100644 index 9fe14ba400ce..000000000000 --- a/.github/workflows/linux-ci.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: linux-ci - -on: - push: - branches: [ main ] - tags: ["*.*.*"] - pull_request: - branches: [ main ] - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-20.04 - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Setup Ccache - uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10 - with: - key: ${{ github.job }}-${{ runner.os }}-${{ runner.arch }} - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install \ - gcc \ - gobject-introspection \ - gtk-doc-tools \ - libcairo2-dev \ - libfreetype6-dev \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libgraphite2-dev \ - libicu-dev \ - ninja-build \ - pkg-config \ - python3 \ - python3-setuptools - - name: Install Python Dependencies - run: sudo pip3 install -r .ci/requirements.txt --require-hashes - - name: Setup Meson - run: | - ccache --version - meson setup build \ - -Dauto_features=enabled \ - -Dchafa=disabled \ - -Dgraphite=enabled \ - -Doptimization=2 \ - -Db_coverage=true \ - -Ddoc_tests=true \ - -Dragel_subproject=true - - name: Build - run: meson compile -Cbuild - - name: Test - run: meson test --print-errorlogs -Cbuild - - name: Generate Documentations - run: ninja -Cbuild harfbuzz-doc - - name: Deploy Documentations - if: github.ref_type == 'tag' - run: .ci/deploy-docs.sh - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - REVISION: ${{ github.sha }} - - name: Generate Coverage - run: ninja -Cbuild coverage-xml - - name: Upload Coverage - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 - with: - file: build/meson-logs/coverage.xml diff --git a/.github/workflows/lwjgl.yml b/.github/workflows/lwjgl.yml new file mode 100644 index 000000000000..1d8a3094bc94 --- /dev/null +++ b/.github/workflows/lwjgl.yml @@ -0,0 +1,264 @@ +# IMPORTANT: after HEAD is updated, the "LWJGL" tag must be recreated! + +# This workflow builds the standalone harfbuzz library. +# However, this git tag ("LWJGL") is also used by LWJGL-CI/freetype. +# Any changes to non-workflow files should be tested with both workflows. + +name: LWJGL Build + +on: + push: + branches: + - main + +env: + AWS_DEFAULT_REGION: us-east-1 + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + S3_PARAMS: --cache-control "public,must-revalidate,proxy-revalidate,max-age=0" + HARFBUZZ_PARAMS: --wrap-mode=default -Dfreetype=disabled -Dtests=disabled -Dbenchmark=disabled -Ddocs=disabled -Dexperimental_api=true --buildtype=release -Db_lto=true -Db_ndebug=true + +jobs: + linux: + name: Linux + runs-on: ubuntu-latest + container: + image: centos:7 + strategy: + fail-fast: false + matrix: + ARCH: [x64] + include: + - ARCH: x64 + defaults: + run: + shell: bash + steps: + - name: Upgrade git + run: | + yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm + yum -y install git + - uses: actions/checkout@v3 + with: + fetch-depth: 3 + - name: Configure yum + run: | + yum -y install epel-release + yum -y update + - name: Install build dependencies + run: | + yum -y install centos-release-scl + yum -y install devtoolset-11-gcc-c++ + yum -y install python3 awscli + - name: Install HarfBuzz dependencies + run: | + yum -y install ninja-build + pip3 install meson + - name: Configure build + run: | + source scl_source enable devtoolset-11 || true + meson setup build $HARFBUZZ_PARAMS + - name: Build + run: | + source scl_source enable devtoolset-11 || true + meson compile --verbose -C build + strip build/src/libharfbuzz.so + - name: Upload artifact + run: aws s3 cp build/src/libharfbuzz.so s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS + - name: Upload git revision + run: | + git config --global --add safe.directory $PWD + git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libharfbuzz.so.git + aws s3 cp libharfbuzz.so.git s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS + + linux-cross: + name: Linux Cross + runs-on: ubuntu-latest + container: + image: ${{matrix.CONTAINER}} + strategy: + fail-fast: false + matrix: + ARCH: [arm32, arm64, ppc64le, riscv64] + include: + # ----- + - ARCH: arm32 + CROSS_ARCH: armhf + CONTAINER: ubuntu:18.04 + TRIPLET: arm-linux-gnueabihf + # ----- + - ARCH: arm64 + CROSS_ARCH: arm64 + CONTAINER: ubuntu:18.04 + TRIPLET: aarch64-linux-gnu + # ----- + - ARCH: ppc64le + CROSS_ARCH: ppc64el + CONTAINER: ubuntu:18.04 + TRIPLET: powerpc64le-linux-gnu + # ----- + - ARCH: riscv64 + CROSS_ARCH: riscv64 + CONTAINER: ubuntu:20.04 + TRIPLET: riscv64-linux-gnu + env: + LWJGL_ARCH: ${{matrix.ARCH}} + defaults: + run: + shell: bash + steps: + - name: Update apt repositories + run: | + apt-get -y update + apt-get -y install software-properties-common + apt-get -y install --reinstall ca-certificates + add-apt-repository -y ppa:git-core/ppa + if: ${{ matrix.CONTAINER == 'ubuntu:18.04' }} + - name: Upgrade git + run: | + apt-get -y update + apt-get -y upgrade + DEBIAN_FRONTEND=noninteractive apt-get -yq install awscli git ninja-build python3-pip + - uses: actions/checkout@v3 + with: + fetch-depth: 3 + - name: Install dependencies + run: DEBIAN_FRONTEND=noninteractive apt-get -yq install cmake gcc-${{matrix.TRIPLET}} g++-${{matrix.TRIPLET}} libc6-dev-${{matrix.CROSS_ARCH}}-cross + - name: Install meson + run: pip3 install meson + - name: Prepare cross-compilation + run: | + sed -i 's/deb http/deb [arch=amd64,i386] http/' /etc/apt/sources.list + grep "ubuntu.com/ubuntu" /etc/apt/sources.list | tee /etc/apt/sources.list.d/ports.list + sed -i 's/amd64,i386/${{matrix.CROSS_ARCH}}/' /etc/apt/sources.list.d/ports.list + sed -i 's#http://.*/ubuntu#http://ports.ubuntu.com/ubuntu-ports#' /etc/apt/sources.list.d/ports.list + dpkg --add-architecture ${{matrix.CROSS_ARCH}} + apt-get update || true + - name: Configure build + run: meson setup build $HARFBUZZ_PARAMS --cross-file lwjgl_linux_${{matrix.ARCH}}.cross + - name: Build + run: | + meson compile --verbose -C build + ${{matrix.TRIPLET}}-strip build/src/libharfbuzz.so + - name: Upload artifact + run: aws s3 cp build/src/libharfbuzz.so s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS + - name: Upload git revision + run: | + git config --global --add safe.directory $(pwd) + git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libharfbuzz.so.git + aws s3 cp libharfbuzz.so.git s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS + + freebsd-cross: + name: FreeBSD Cross + runs-on: macos-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 3 + - name: Build + uses: cross-platform-actions/action@v0.21.1 + with: + operating_system: freebsd + architecture: x86-64 + version: '13.2' + memory: 4G + shell: bash + environment_variables: HARFBUZZ_PARAMS + run: | + sudo pkg install -y git python3 ninja + python3 -m ensurepip --upgrade + export PATH=$PATH:/home/runner/.local/bin + pip3 install meson + meson setup build $HARFBUZZ_PARAMS + meson compile --verbose -C build + strip build/src/libharfbuzz.so + - name: Upload artifact # Symlinks are not copied out of the VM. These SOs are versioned. + run: aws s3 cp `find -E . -maxdepth 3 -regex './build/src/libharfbuzz.so(\.[0-9]+)*'` s3://lwjgl-build/nightly/freebsd/x64/libharfbuzz.so $S3_PARAMS + - name: Upload git revision + run: | + git config --global --add safe.directory $PWD + git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libharfbuzz.so.git + aws s3 cp libharfbuzz.so.git s3://lwjgl-build/nightly/freebsd/x64/ $S3_PARAMS + + macos: + name: macOS + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + ARCH: [x64, arm64] + include: + - ARCH: x64 + MACOS: 10.9 + MESON_PARAMS: + - ARCH: arm64 + MACOS: 11.0 + MESON_PARAMS: --cross-file lwjgl_macos_arm64.cross + env: + MACOSX_DEPLOYMENT_TARGET: 11.0 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 3 + - name: Install dependencies + run: brew install meson + - name: Configure build + run: MACOSX_DEPLOYMENT_TARGET=${{matrix.MACOS}} meson setup build $HARFBUZZ_PARAMS -Dcoretext=enabled ${{matrix.MESON_PARAMS}} + - name: Build + run: | + MACOSX_DEPLOYMENT_TARGET=${{matrix.MACOS}} meson compile --verbose -C build + strip -u -r build/src/libharfbuzz.dylib + - name: Upload artifact + run: aws s3 cp build/src/libharfbuzz.dylib s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS + - name: Upload git revision + run: | + git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libharfbuzz.dylib.git + aws s3 cp libharfbuzz.dylib.git s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS + + windows: + name: Windows + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + ARCH: [x86, x64, arm64] + include: + - ARCH: x86 + MSVC_ARCH: amd64_x86 + PLATFORM: Win32 + MESON_PARAMS: + - ARCH: x64 + MSVC_ARCH: amd64 + PLATFORM: x64 + MESON_PARAMS: + - ARCH: arm64 + MSVC_ARCH: amd64_arm64 + PLATFORM: ARM64 + MESON_PARAMS: --cross-file lwjgl_windows_arm64.cross + defaults: + run: + shell: cmd + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 3 + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{matrix.MSVC_ARCH}} + # Strawberry: see LWJGL-CI/freetype's workflow for details. + - name: Install dependencies + run: | + pip3 install meson + rmdir C:\Strawberry /s /q + - name: Configure build + run: meson setup build %HARFBUZZ_PARAMS% -Dgdi=enabled -Ddirectwrite=enabled -Db_vscrt=mt ${{matrix.MESON_PARAMS}} + - name: Build + run: meson compile --verbose -C build + - name: Upload artifact + run: aws s3 cp build\src\harfbuzz.dll s3://lwjgl-build/nightly/windows/${{matrix.ARCH}}/ %S3_PARAMS% + - name: Upload git revision + run: | + git log --first-parent --pretty=format:%%H HEAD~2..HEAD~1 > harfbuzz.dll.git + aws s3 cp harfbuzz.dll.git s3://lwjgl-build/nightly/windows/${{matrix.ARCH}}/ %S3_PARAMS% diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml deleted file mode 100644 index 94d4b122f8ff..000000000000 --- a/.github/workflows/macos-ci.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: macos-ci - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -permissions: - contents: read - -jobs: - build: - runs-on: macos-latest - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Setup Ccache - uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10 - with: - key: ${{ github.job }}-${{ runner.os }}-${{ runner.arch }} - - name: Install Dependencies - run: | - export HOMEBREW_NO_AUTO_UPDATE=1 - export HOMEBREW_NO_INSTALL_CLEANUP=1 - brew install \ - cairo \ - freetype \ - glib \ - gobject-introspection \ - graphite2 \ - icu4c \ - meson \ - ninja \ - pkg-config - - name: Install Python Dependencies - run: pip3 install -r .ci/requirements.txt --require-hashes - - name: Setup Meson - run: | - export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig" - ccache --version - meson setup build \ - -Dauto_features=enabled \ - -Ddocs=disabled \ - -Dchafa=disabled \ - -Dcoretext=enabled \ - -Dgraphite=enabled \ - -Doptimization=2 \ - -Db_coverage=true \ - - name: Build - run: meson compile -Cbuild - - name: Test - run: meson test --print-errorlogs -Cbuild - - name: Generate Coverage - run: ninja -Cbuild coverage-xml - - name: Upload Coverage - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 - with: - file: build/meson-logs/coverage.xml diff --git a/.github/workflows/msvc-ci.yml b/.github/workflows/msvc-ci.yml deleted file mode 100644 index 85dc63fc6077..000000000000 --- a/.github/workflows/msvc-ci.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: msvc - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -permissions: - contents: read - -jobs: - msvc: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - os: [windows-2019, windows-latest] - include: - - name: msvc-2019-x86 - os: windows-2019 - ARCH: x86 - - name: msvc-2019-amd64 - os: windows-latest - ARCH: amd64 - name: ${{ matrix.name }} - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Setup Ccache - uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10 - with: - variant: sccache - key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.ARCH }} - - name: Setup Python - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 - with: - python-version: '3.x' - - name: Setup MSVC - uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # v1.12.1 - with: - arch : ${{ matrix.ARCH }} - - name: Install Python Dependencies - run: | - pip3 install -r .ci/requirements.txt --require-hashes - - name: Setup Meson - run: | - sccache --version - meson setup build ` - --wrap-mode=forcefallback ` - --buildtype=release ` - -Dglib=enabled ` - -Dfreetype=enabled ` - -Dgdi=enabled ` - -Ddirectwrite=enabled - - name: Build - run: meson compile -Cbuild - - name: Test - run: meson test --print-errorlogs --suite=harfbuzz -Cbuild diff --git a/.github/workflows/msys2-ci.yml b/.github/workflows/msys2-ci.yml deleted file mode 100644 index a0947e39c488..000000000000 --- a/.github/workflows/msys2-ci.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: msys2 - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -permissions: - contents: read - -jobs: - msys2: - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - include: - - MSYSTEM: MINGW32 - MSYS2_ARCH: i686 - - MSYSTEM: MINGW64 - MSYS2_ARCH: x86_64 - name: ${{ matrix.MSYSTEM }} - - env: - # XXX: For some reason enabling jit debugging "fixes" random python crashes - # see https://github.com/msys2/MINGW-packages/issues/11864 - MSYS: "winjitdebug" - - defaults: - run: - shell: msys2 {0} - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Setup MSYS2 - uses: msys2/setup-msys2@cf96e00c0aab3788743aaf63b64146f0d383cee9 # v2 - with: - msystem: ${{ matrix.MSYSTEM }} - update: true - install: >- - mingw-w64-${{ matrix.MSYS2_ARCH }}-cairo - mingw-w64-${{ matrix.MSYS2_ARCH }}-freetype - mingw-w64-${{ matrix.MSYS2_ARCH }}-gcc - mingw-w64-${{ matrix.MSYS2_ARCH }}-gcc-libs - mingw-w64-${{ matrix.MSYS2_ARCH }}-gettext - mingw-w64-${{ matrix.MSYS2_ARCH }}-glib2 - mingw-w64-${{ matrix.MSYS2_ARCH }}-gobject-introspection - mingw-w64-${{ matrix.MSYS2_ARCH }}-graphite2 - mingw-w64-${{ matrix.MSYS2_ARCH }}-icu - mingw-w64-${{ matrix.MSYS2_ARCH }}-meson - mingw-w64-${{ matrix.MSYS2_ARCH }}-ninja - mingw-w64-${{ matrix.MSYS2_ARCH }}-pkg-config - mingw-w64-${{ matrix.MSYS2_ARCH }}-python - mingw-w64-${{ matrix.MSYS2_ARCH }}-python-pip - - name: Remove installed HarfBuzz DLLs - run: | - rm -f -v /ming*/bin/libharfbuzz-*.dll - - name: Install Python Dependencies - run: | - pip3 install -r .ci/requirements-fonttools.txt --require-hashes - - name: Setup Meson - run: | - meson setup build \ - --wrap-mode=nodownload \ - --auto-features=enabled \ - -Ddocs=disabled \ - -Ddirectwrite=enabled \ - -Dgdi=enabled \ - -Dgraphite=enabled \ - -Dchafa=disabled - - name: Build - run: meson compile -Cbuild - - name: Test - run: meson test --print-errorlogs --suite=harfbuzz -Cbuild - - name: Upload DLLs - if: always() - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - with: - name: libharfbuzz-${{ matrix.MSYS2_ARCH }} - path: ./build/src/libharfbuzz-*.dll diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml deleted file mode 100644 index 4e013663043e..000000000000 --- a/.github/workflows/scorecard.yml +++ /dev/null @@ -1,64 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. They are provided -# by a third-party and are governed by separate terms of service, privacy -# policy, and support documentation. - -name: Scorecard supply-chain security -on: - # For Branch-Protection check. Only the default branch is supported. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection - branch_protection_rule: - # To guarantee Maintained check is occasionally updated. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained - schedule: - - cron: '19 14 * * 6' - push: - branches: [ "main" ] - -# Declare default permissions as read only. -permissions: read-all - -jobs: - analysis: - name: Scorecard analysis - runs-on: ubuntu-latest - permissions: - # Needed to upload the results to code-scanning dashboard. - security-events: write - # Needed to publish results and get a badge (see publish_results below). - id-token: write - - steps: - - name: "Checkout code" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - persist-credentials: false - - - name: "Run analysis" - uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 - with: - results_file: results.sarif - results_format: sarif - # (Optional) Fine-grained PAT token. Uncomment the `repo_token` line below if: - # you want to enable the full Branch-Protection check on a *public* repository - # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional. - # repo_token: ${{ secrets.SCORECARD_TOKEN }} - - # - Publish results to OpenSSF REST API for easy access by consumers - # - Allows the repository to include the Scorecard badge. - # - See https://github.com/ossf/scorecard-action#publishing-results. - publish_results: true - - # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF - # format to the repository Actions tab. - - name: "Upload artifact" - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - with: - name: SARIF file - path: results.sarif - retention-days: 5 - - # Upload the results to GitHub's code scanning dashboard. - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@74483a38d39275f33fcff5f35b679b5ca4a26a99 # v2.22.5 - with: - sarif_file: results.sarif diff --git a/lwjgl_linux_arm32.cross b/lwjgl_linux_arm32.cross new file mode 100644 index 000000000000..e563d99007e0 --- /dev/null +++ b/lwjgl_linux_arm32.cross @@ -0,0 +1,12 @@ +[host_machine] +system = 'linux' +cpu_family = 'arm' +cpu = 'armhf' +endian = 'little' + +[binaries] +c = '/usr/bin/arm-linux-gnueabihf-gcc' +cpp = '/usr/bin/arm-linux-gnueabihf-g++' +ar = '/usr/bin/arm-linux-gnueabihf-ar' +strip = '/usr/bin/arm-linux-gnueabihf-strip' +pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config' \ No newline at end of file diff --git a/lwjgl_linux_arm64.cross b/lwjgl_linux_arm64.cross new file mode 100644 index 000000000000..4c612a4dbe0c --- /dev/null +++ b/lwjgl_linux_arm64.cross @@ -0,0 +1,12 @@ +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'arm64' +endian = 'little' + +[binaries] +c = '/usr/bin/aarch64-linux-gnu-gcc' +cpp = '/usr/bin/aarch64-linux-gnu-g++' +ar = '/usr/bin/aarch64-linux-gnu-gcc-ar' +strip = '/usr/bin/aarch64-linux-gnu-strip' +pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config' \ No newline at end of file diff --git a/lwjgl_linux_ppc64le.cross b/lwjgl_linux_ppc64le.cross new file mode 100644 index 000000000000..f59543e29f03 --- /dev/null +++ b/lwjgl_linux_ppc64le.cross @@ -0,0 +1,12 @@ +[host_machine] +system = 'linux' +cpu_family = 'ppc64' +cpu = 'ppc64' +endian = 'little' + +[binaries] +c = '/usr/bin/powerpc64le-linux-gnu-gcc' +cpp = '/usr/bin/powerpc64le-linux-gnu-g++' +ar = '/usr/bin/powerpc64le-linux-gnu-gcc-ar' +strip = '/usr/bin/powerpc64le-linux-gnu-strip' +pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config' \ No newline at end of file diff --git a/lwjgl_linux_riscv64.cross b/lwjgl_linux_riscv64.cross new file mode 100644 index 000000000000..f1af6fc1e6ce --- /dev/null +++ b/lwjgl_linux_riscv64.cross @@ -0,0 +1,12 @@ +[host_machine] +system = 'linux' +cpu_family = 'riscv64' +cpu = 'riscv64' +endian = 'little' + +[binaries] +c = '/usr/bin/riscv64-linux-gnu-gcc' +cpp = '/usr/bin/riscv64-linux-gnu-g++' +ar = '/usr/bin/riscv64-linux-gnu-gcc-ar' +strip = '/usr/bin/riscv64-linux-gnu-strip' +pkgconfig = '/usr/bin/riscv64-linux-gnu-pkg-config' \ No newline at end of file diff --git a/lwjgl_macos_arm64.cross b/lwjgl_macos_arm64.cross new file mode 100644 index 000000000000..9910546f9905 --- /dev/null +++ b/lwjgl_macos_arm64.cross @@ -0,0 +1,21 @@ +[host_machine] +system = 'darwin' +cpu_family = 'aarch64' +cpu = 'arm64' +endian = 'little' + +[binaries] +c = ['clang'] +cpp = ['clang++'] +objc = ['clang'] +objcpp = ['clang++'] + +[built-in options] +c_args = ['-target', 'aarch64-apple-darwin', '-arch', 'arm64'] +cpp_args = ['-target', 'aarch64-apple-darwin', '-arch', 'arm64'] +objc_args = ['-target', 'aarch64-apple-darwin', '-arch', 'arm64'] +objcpp_args = ['-target', 'aarch64-apple-darwin', '-arch', 'arm64'] +c_link_args = ['-target', 'aarch64-apple-darwin', '-arch', 'arm64'] +cpp_link_args = ['-target', 'aarch64-apple-darwin', '-arch', 'arm64'] +objc_link_args = ['-target', 'aarch64-apple-darwin', '-arch', 'arm64'] +objcpp_link_args = ['-target', 'aarch64-apple-darwin', '-arch', 'arm64'] \ No newline at end of file diff --git a/lwjgl_windows_arm64.cross b/lwjgl_windows_arm64.cross new file mode 100644 index 000000000000..e7e5939aa15e --- /dev/null +++ b/lwjgl_windows_arm64.cross @@ -0,0 +1,12 @@ +[host_machine] +system = 'windows' +cpu_family = 'aarch64' +cpu = 'armv8' +endian = 'little' + +[binaries] +c = 'cl' +cpp = 'cl' +fc = 'false' +ar = 'lib' +windres = 'rc' \ No newline at end of file diff --git a/src/meson.build b/src/meson.build index 77c7e750178a..19790898286f 100644 --- a/src/meson.build +++ b/src/meson.build @@ -563,9 +563,12 @@ version = '0.@0@.0'.format(hb_version_int) extra_hb_cpp_args = [] if cpp.get_define('_MSC_FULL_VER') != '' - if get_option('default_library') != 'static' + # Commenting this out does not change anything for the standalone build. + # However, it is necessary for the LWJGL-CI/freetype build, where harfbuzz + # is linked statically, but we still need to export the API symbols. + #if get_option('default_library') != 'static' extra_hb_cpp_args += '-DHB_DLL_EXPORT' - endif + #endif hb_so_version = '' else hb_so_version = '0' diff --git a/subprojects/freetype2.wrap b/subprojects/freetype2.wrap index fe325d84ebf6..40a530ceed16 100644 --- a/subprojects/freetype2.wrap +++ b/subprojects/freetype2.wrap @@ -1,9 +1,7 @@ -[wrap-file] -directory = freetype-2.13.0 -source_url = https://download.savannah.gnu.org/releases/freetype/freetype-2.13.0.tar.xz -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/freetype2_2.13.0-1/freetype-2.13.0.tar.xz -source_filename = freetype-2.13.0.tar.xz -source_hash = 5ee23abd047636c24b2d43c6625dcafc66661d1aca64dec9e0d05df29592624c +[wrap-git] +directory=freetype +url=https://github.com/LWJGL-CI/freetype.git +revision=LWJGL [provide] freetype2 = freetype_dep