Skip to content

Commit

Permalink
Metal ANGLE Updates (#469)
Browse files Browse the repository at this point in the history
* merge

(cherry picked from commit 3112874ca3722ff38b9fb7157a72b91018d9f433)

* Apothecary Fix missing Metal

* Apothecary fix load cache

* Metal Angle fixed depends

* Build ID 2

* Kiss - missing build_id

* Fix cache

* MetalANGLE cleanup include

* Fix cache issue

* Actions output
export config for cmake / pkg files

* debug vs artifact
  • Loading branch information
danoli3 authored Jan 8, 2025
1 parent 6a2a342 commit b42fe32
Show file tree
Hide file tree
Showing 39 changed files with 652 additions and 208 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ jobs:
fi
rm -f xout/*.tar.bz2
rm -f out/*.tar.bz2
- name: List output directory1
run: ls -lah out/
- name: Build iOS arm64
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: scripts/build.sh
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ jobs:
fi
rm -f xout/*.tar.bz2
rm -f out/*.tar.bz2
- name: List output directory1
run: ls -lah out/
- name: Build macOS x86_64
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: scripts/build.sh
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-vs2019-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ jobs:
fi
rm -f xout/*.tar.bz2
rm -f out/*.tar.bz2
- name: List output directory1
run: ls -lah out/
- name: Build64
working-directory: ${{env.GITHUB_WORKSPACE}}
run: scripts/build.sh
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-vs2022-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ jobs:
fi
rm -f xout/*.tar.bz2
rm -f out/*.tar.bz2
- name: List output directory1
run: ls -lah out/
- name: BuildARM64
working-directory: ${{env.GITHUB_WORKSPACE}}
run: scripts/build.sh
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/build-vs2022-arm64ec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
unzip -o "$zip" -d out/
done
echo "Extraction complete."
rm out/*.zip
# rm out/*.zip
else
echo "No zip files to extract."
fi
Expand All @@ -146,8 +146,10 @@ jobs:
else
echo "No .tar.bz2 files to extract."
fi
rm -f xout/*.tar.bz2
rm -f out/*.tar.bz2
# rm -f xout/*.tar.bz2
# rm -f out/*.tar.bz2
- name: List output directory1
run: ls -lah out/
- name: BuildARM64EC
working-directory: ${{env.GITHUB_WORKSPACE}}
run: scripts/build.sh
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/build-vs2022-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
unzip -o "$zip" -d out/
done
echo "Extraction complete."
rm out/*.zip
# rm out/*.zip
else
echo "No zip files to extract."
fi
Expand All @@ -140,8 +140,10 @@ jobs:
else
echo "No .tar.bz2 files to extract."
fi
rm -f xout/*.tar.bz2
rm -f out/*.tar.bz2
# rm -f xout/*.tar.bz2
# rm -f out/*.tar.bz2
- name: List output directory1
run: ls -lah out/
- name: Build64
working-directory: ${{env.GITHUB_WORKSPACE}}
run: scripts/build.sh
Expand Down
349 changes: 221 additions & 128 deletions apothecary/apothecary

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apothecary/formulas/FreeImage/FreeImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "FreeImage" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "FreeImage" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
2 changes: 1 addition & 1 deletion apothecary/formulas/_depends/automake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "automake" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "automake" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
4 changes: 2 additions & 2 deletions apothecary/formulas/_depends/brotli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "brotli" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "brotli" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
else
echo 0
fi
}
}
2 changes: 1 addition & 1 deletion apothecary/formulas/_depends/pixman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "pixman" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "pixman" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
2 changes: 1 addition & 1 deletion apothecary/formulas/_depends/pkg-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "pkg-config" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "pkg-config" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
2 changes: 1 addition & 1 deletion apothecary/formulas/assimp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "assimp" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "assimp" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
4 changes: 2 additions & 2 deletions apothecary/formulas/cairo/cairo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,11 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "cairo" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "cairo" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
else
echo 0
fi
}
}
2 changes: 1 addition & 1 deletion apothecary/formulas/curl/curl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "curl" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "curl" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
2 changes: 1 addition & 1 deletion apothecary/formulas/fmt/fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "fmt" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "fmt" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
2 changes: 1 addition & 1 deletion apothecary/formulas/freetype/freetype.sh
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "freetype" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "freetype" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
2 changes: 1 addition & 1 deletion apothecary/formulas/glew/glew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "glew" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "glew" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
2 changes: 1 addition & 1 deletion apothecary/formulas/glfw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "glfw3" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "glfw3" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
3 changes: 2 additions & 1 deletion apothecary/formulas/kiss/kiss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ FORMULA_DEPENDS=( )

# define the version
VER=130
BUILD_ID=1

# tools for git use
GIT_URL=https://github.com/mborgerding/kissfft.git
Expand Down Expand Up @@ -63,7 +64,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "glfw3" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "glfw3" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
2 changes: 1 addition & 1 deletion apothecary/formulas/libpng/libpng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "libpng" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "libpng" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
81 changes: 81 additions & 0 deletions apothecary/formulas/libssh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/usr/bin/env bash
#
# libssh2

# Define the version
FORMULA_TYPES=( "vs" "osx" "ios" "android" )

FORMULA_DEPENDS=( "zlib" "openssl" )

VER=1.11.0-dev
GIT_URL=https://github.com/libssh2/libssh2.git

DEFS=""

function download() {
. "$DOWNLOADER_SCRIPT"
FILE_NAME=libssh2-$VER

if [ -d $FILE_NAME ]; then
echo "Directory $FILE_NAME already exists. Pulling latest changes."
cd $FILE_NAME
git pull origin master
cd ..
else
git clone --depth=1 --branch master $GIT_URL $FILE_NAME
fi
}

function prepare() {
apothecaryDependencies download
echo "Preparation complete"
}

function build() {
LIBS_ROOT=$(realpath $LIBS_DIR)

mkdir -p "build_${TYPE}_${PLATFORM}"
cd "build_${TYPE}_${PLATFORM}"

cmake .. \
-DCMAKE_C_FLAGS="${DEFS}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=Release

cmake --build . --config Release --target install
cd ..

fi
}

function copy() {
mkdir -p $1/include
mkdir -p $1/lib/$TYPE
mkdir -p $1/lib/$TYPE/$PLATFORM/

cp -v "build_${TYPE}_${PLATFORM}/Release/lib/libssh2.a" $1/lib/$TYPE/$PLATFORM/libssh2.a
cp -Rv "build_${TYPE}_${PLATFORM}/Release/include" $1/
cp -v LICENSE $1/license/
}

function clean() {
if [ -d "build_${TYPE}_${PLATFORM}" ]; then
rm -r build_${TYPE}_${PLATFORM}
fi
}

function save() {
. "$SAVE_SCRIPT"
savestatus ${TYPE} "libssh2" ${ARCH} ${VER} true "${SAVE_FILE}"
}

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "libssh2" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
else
echo 0
fi
}
2 changes: 1 addition & 1 deletion apothecary/formulas/libusb/libusb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "libusb" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "libusb" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
2 changes: 1 addition & 1 deletion apothecary/formulas/libxml2/libxml2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ function clean() {

function load() {
. "$LOAD_SCRIPT"
LOAD_RESULT=$(loadsave ${TYPE} "libxml2" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${PLATFORM} )
LOAD_RESULT=$(loadsave ${TYPE} "libxml2" ${ARCH} ${VER} "$LIBS_DIR_REAL/$1/lib/$TYPE/$PLATFORM" ${BUILD_ID} )
PREBUILT=$(echo "$LOAD_RESULT" | tail -n 1)
if [ "$PREBUILT" -eq 1 ]; then
echo 1
Expand Down
Loading

0 comments on commit b42fe32

Please sign in to comment.