Compare commits
9 Commits
xcode-15
...
release-2.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 064aed35b6 | |||
| 0505abce23 | |||
| 89b08709e4 | |||
| f4ba5cd328 | |||
| 20b46e76dd | |||
| 5eb09593a0 | |||
| 6836608fca | |||
| 67b2ee52e8 | |||
| a5a9656732 |
@@ -0,0 +1,11 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -0,0 +1,45 @@
|
||||
name: pull request
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
xcode: [ Xcode_14.3, Xcode_15.2.0 ]
|
||||
os: [ macos-13 ]
|
||||
include:
|
||||
- xcode: Xcode_15.4
|
||||
os: macos-14
|
||||
- xcode: Xcode_16.2
|
||||
os: macos-14
|
||||
steps:
|
||||
- name: ls Xcode
|
||||
run: ls -la /Applications/Xcode*
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
- name: get architecture
|
||||
run: |
|
||||
echo "ARCHITECTURE=$(uname -m)" >> $GITHUB_ENV
|
||||
echo $(uname -m)
|
||||
- name: Set XCode Version
|
||||
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app
|
||||
- name: schemes list
|
||||
run: xcodebuild -workspace SwiftGit2.xcworkspace -list
|
||||
- name: update_libgit2
|
||||
run: script/update_libgit2
|
||||
- name: bootstrap
|
||||
run: script/bootstrap
|
||||
# - name: cibuild
|
||||
# run: script/cibuild
|
||||
- name: Build project
|
||||
run: xcodebuild -workspace SwiftGit2.xcworkspace -scheme SwiftGit2-OSX -archivePath ./SwiftGit2 archive ARCHS="${{ env.ARCHITECTURE }}"
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
language: objective-c
|
||||
|
||||
os: osx
|
||||
osx_image: xcode11.4
|
||||
|
||||
sudo: false # Enable container-based builds
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- SCHEME="SwiftGit2-OSX"
|
||||
- SCHEME="SwiftGit2-iOS"
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
before_install:
|
||||
- gem update bundler # https://github.com/bundler/bundler/pull/4981
|
||||
- gem install xcpretty
|
||||
- gem install xcpretty-travis-formatter
|
||||
|
||||
install: script/bootstrap
|
||||
|
||||
script: script/cibuild
|
||||
|
||||
branches:
|
||||
only: # whitelist
|
||||
- master
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
/usr/local/opt/openssl/lib/libcrypto.a
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
/usr/local/opt/openssl/lib/libssl.a
|
||||
@@ -1,5 +1,4 @@
|
||||
# SwiftGit2
|
||||
[](https://travis-ci.org/SwiftGit2/SwiftGit2)
|
||||
[](#carthage)
|
||||
[](https://github.com/SwiftGit2/SwiftGit2/releases)
|
||||

|
||||
|
||||
@@ -990,7 +990,7 @@
|
||||
INSTALL_MODE_FLAG = "";
|
||||
INSTALL_OWNER = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
@@ -1006,7 +1006,7 @@
|
||||
INSTALL_MODE_FLAG = "";
|
||||
INSTALL_OWNER = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
@@ -1028,7 +1028,7 @@
|
||||
OTHER_LDFLAGS = (
|
||||
"-force_load",
|
||||
"External/libgit2-mac/libgit2-mac.a",
|
||||
/usr/local/lib/libssh2.a,
|
||||
External/libssh2.a,
|
||||
"-lgit2-mac",
|
||||
"-lcrypto",
|
||||
"-lssl",
|
||||
@@ -1058,7 +1058,7 @@
|
||||
OTHER_LDFLAGS = (
|
||||
"-force_load",
|
||||
"External/libgit2-mac/libgit2-mac.a",
|
||||
/usr/local/lib/libssh2.a,
|
||||
External/libssh2.a,
|
||||
"-lgit2-mac",
|
||||
"-lcrypto",
|
||||
"-lssl",
|
||||
@@ -1076,7 +1076,7 @@
|
||||
baseConfigurationReference = BEB31F531A0D75EE00F525B9 /* macOS-Application.xcconfig */;
|
||||
buildSettings = {
|
||||
INFOPLIST_FILE = SwiftGit2Tests/Info.plist;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
@@ -1087,7 +1087,7 @@
|
||||
baseConfigurationReference = BEB31F531A0D75EE00F525B9 /* macOS-Application.xcconfig */;
|
||||
buildSettings = {
|
||||
INFOPLIST_FILE = SwiftGit2Tests/Info.plist;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
|
||||
@@ -571,7 +571,15 @@ public final class Repository {
|
||||
/// :param: branch The branch to get all commits from
|
||||
/// :returns: Returns a result with array of branches or the error that occurred
|
||||
public func commits(in branch: Branch) -> CommitIterator {
|
||||
let iterator = CommitIterator(repo: self, root: branch.oid.oid)
|
||||
return commits(from: branch.oid)
|
||||
}
|
||||
|
||||
/// Load all commits from the given base in topological & time order descending
|
||||
///
|
||||
/// :param: base The oid to get all commits from
|
||||
/// :returns: Returns a result with array of branches or the error that occurred
|
||||
public func commits(from base: OID) -> CommitIterator {
|
||||
let iterator = CommitIterator(repo: self, root: base.oid)
|
||||
return iterator
|
||||
}
|
||||
|
||||
|
||||
+52
-24
@@ -46,6 +46,7 @@ main ()
|
||||
|
||||
check_deps ()
|
||||
{
|
||||
echo "** check_deps **"
|
||||
# Check if Homebrew is installed
|
||||
which -s brew
|
||||
local result=$?
|
||||
@@ -56,13 +57,21 @@ check_deps ()
|
||||
echo "Homebrew is not installed (http://brew.sh). You will need to manually ensure the following tools are installed:"
|
||||
echo " $REQUIRED_TOOLS"
|
||||
echo
|
||||
echo "Additionally, the following libssh2 files must be symlinked under /usr/local:"
|
||||
echo "Additionally, the following libssh2 files must be symlinked under /usr/local or /opt/homebrew :"
|
||||
echo " lib/libssh2.a include/libssh2.h include/libssh2_sftp.h include/libssh2_publickey.h"
|
||||
exit $result
|
||||
|
||||
if [ ! -z "$CI" ]
|
||||
then
|
||||
echo
|
||||
echo "I will try to install brew now on the github runner"
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Ensure that we have libgit2's dependencies installed.
|
||||
installed=`brew list`
|
||||
installed=$(brew list)
|
||||
|
||||
for tool in $REQUIRED_TOOLS
|
||||
do
|
||||
@@ -71,6 +80,7 @@ check_deps ()
|
||||
|
||||
if [ "$code" -eq "0" ]
|
||||
then
|
||||
echo "*** $tool is available 👍"
|
||||
continue
|
||||
elif [ "$code" -ne "1" ]
|
||||
then
|
||||
@@ -81,27 +91,45 @@ check_deps ()
|
||||
brew install "$tool"
|
||||
done
|
||||
|
||||
brew_prefix=`brew --prefix`
|
||||
expected_prefix=/usr/local
|
||||
|
||||
if [ "$brew_prefix" != "$expected_prefix" ]
|
||||
then
|
||||
echo "*** Adding soft links into $expected_prefix..."
|
||||
|
||||
products=(lib/libssh2.a include/libssh2.h include/libssh2_sftp.h include/libssh2_publickey.h)
|
||||
|
||||
for product in "${products[@]}"
|
||||
do
|
||||
destination="$expected_prefix/$product"
|
||||
if [ -e "$destination" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
sudo mkdir -p "$(dirname "$destination")"
|
||||
sudo ln -s "$brew_prefix/$product" "$destination"
|
||||
done
|
||||
brew_prefix=$(brew --prefix)
|
||||
if [[ $(uname -m) == 'arm64' ]]; then
|
||||
echo "** Running on a Apple Silicon M1"
|
||||
expected_prefix=/opt/homebrew
|
||||
else
|
||||
echo "** Running on a Apple x86"
|
||||
expected_prefix=/usr/local
|
||||
fi
|
||||
|
||||
install_path="./External"
|
||||
pwd
|
||||
set -x
|
||||
cp "$brew_prefix"/lib/libcrypto.a $install_path
|
||||
cp "$brew_prefix"/lib/libssl.a $install_path
|
||||
cp "$brew_prefix"/lib/libssh2.a $install_path
|
||||
set +x
|
||||
if [ "$brew_prefix" != "$expected_prefix" ]
|
||||
then
|
||||
echo "*** Adding soft links into $expected_prefix..."
|
||||
|
||||
products=(lib/libssh2.a include/libssh2.h include/libssh2_sftp.h include/libssh2_publickey.h)
|
||||
|
||||
for product in "${products[@]}"
|
||||
do
|
||||
destination="$expected_prefix/$product"
|
||||
if [ -e "$destination" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
sudo mkdir -p "$(dirname "$destination")"
|
||||
sudo ln -s "$brew_prefix/$product" "$destination"
|
||||
done
|
||||
fi
|
||||
|
||||
# openssl@1 is expected
|
||||
#sslSource=$(find $brew_prefix -name libcrypto.a | grep openssl | sort | head -1 | xargs dirname)
|
||||
#echo "Find libcrypto.a and take first $sslSource and copy to install_path=$install_path"
|
||||
#cp $sslSource/* "$install_path" 2>/dev/null | echo "Copy and ignore subdirectory. This makes build work on x86 and arm64"
|
||||
}
|
||||
|
||||
bootstrap_submodule ()
|
||||
@@ -110,7 +138,7 @@ bootstrap_submodule ()
|
||||
|
||||
if [ -e "$bootstrap" ]
|
||||
then
|
||||
echo "*** Bootstrapping $name..."
|
||||
echo "*** Bootstrapping ..."
|
||||
"$bootstrap" >/dev/null
|
||||
else
|
||||
update_submodules
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ if [ "$SCHEME" == "SwiftGit2-OSX" ]; then
|
||||
|
||||
xcodebuild -workspace "$XCWORKSPACE" \
|
||||
-scheme "$SCHEME" \
|
||||
${XCODE_OPTIONS[*]} \
|
||||
"${XCODE_OPTIONS[*]}" \
|
||||
build test \
|
||||
2>&1 | xcpretty $XCPRETTY_FORMAT_OPTIONS
|
||||
elif [ "$SCHEME" == "SwiftGit2-iOS" ]; then
|
||||
@@ -80,7 +80,7 @@ elif [ "$SCHEME" == "SwiftGit2-iOS" ]; then
|
||||
-scheme "$SCHEME" \
|
||||
-destination "id=$DESTINATION_ID" \
|
||||
-sdk iphonesimulator \
|
||||
${XCODE_OPTIONS[*]} \
|
||||
"${XCODE_OPTIONS[*]}" \
|
||||
build test \
|
||||
2>&1 | xcpretty $XCPRETTY_FORMAT_OPTIONS
|
||||
fi
|
||||
|
||||
@@ -5,18 +5,19 @@ set -e
|
||||
# augment path to help it find cmake installed in /usr/local/bin,
|
||||
# e.g. via brew. Xcode's Run Script phase doesn't seem to honor
|
||||
# ~/.MacOSX/environment.plist
|
||||
PATH="/usr/local/bin:$PATH"
|
||||
if [[ `uname -m` == 'arm64' ]]; then
|
||||
echo "** Running on a Apple Silicon M1"
|
||||
PATH="/opt/homebrew/bin:$PATH"
|
||||
else
|
||||
echo "** Running on a Apple x86"
|
||||
PATH="/usr/local/bin:$PATH"
|
||||
fi
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
source "${SCRIPT_DIR}/xcode_functions.sh"
|
||||
|
||||
function setup_build_environment ()
|
||||
{
|
||||
# augment path to help it find cmake installed in /usr/local/bin,
|
||||
# e.g. via brew. Xcode's Run Script phase doesn't seem to honor
|
||||
# ~/.MacOSX/environment.plist
|
||||
PATH="/usr/local/bin:$PATH"
|
||||
|
||||
pushd "$SCRIPT_DIR/.." > /dev/null
|
||||
ROOT_PATH="$PWD"
|
||||
popd > /dev/null
|
||||
|
||||
Reference in New Issue
Block a user