Skip to content

Commit

Permalink
Bump v71
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Jan 8, 2024
1 parent 9c2f086 commit ddaeeed
Show file tree
Hide file tree
Showing 14 changed files with 158 additions and 174 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
paths:
- .github/workflows/build.yml
- 1k/build*
- 1k/nsdk1k.cpp
- 1k/ios.cmake
- src/**/build*
- src/**/install*
Expand Down Expand Up @@ -78,9 +77,7 @@ jobs:

- name: Build
shell: pwsh
run: |
$env:XCODE_VERSION='${{ steps.setup-xcode.outputs.version }}'
./build.ps1 osx $env:BUILD_ARCH
run: ./build.ps1 osx $env:BUILD_ARCH

- name: Upload
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -114,9 +111,7 @@ jobs:

- name: Build
shell: pwsh
run: |
$env:XCODE_VERSION='${{ steps.setup-xcode.outputs.version }}'
./build.ps1 ios $env:BUILD_ARCH
run: ./build.ps1 ios $env:BUILD_ARCH

- name: Upload
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -150,9 +145,7 @@ jobs:

- name: Build
shell: pwsh
run: |
$env:XCODE_VERSION='${{ steps.setup-xcode.outputs.version }}'
./build.ps1 tvos $env:BUILD_ARCH
run: ./build.ps1 tvos $env:BUILD_ARCH

- name: Upload
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ jobs:
${{ env.DIST_VERLIST }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: axmolengine/buildware
GITHUB_REPOSITORY: simdsoft/1kiss
4 changes: 2 additions & 2 deletions 1k/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# SOFTWARE.
#
#
# The 1k/build.ps1, will be core script of project https://github.com/axmolengine/1k
# The 1k/build.ps1, the core script of project 1kiss(1k)
# options
# -p: build target platform: win32,winrt(winuwp),linux,android,osx(mac),ios,tvos,watchos,wasm
# for android: will search ndk in sdk_root which is specified by env:ANDROID_HOME first,
Expand Down Expand Up @@ -830,7 +830,7 @@ function setup_llvm() {
$7z_pkg_out = Join-Path $external_prefix '7z2301-x64.zip'
if (!(Test-Path $7z_prog -PathType Leaf)) {
# https://www.7-zip.org/download.html
download_and_expand -url 'https://github.com/axmolengine/archive/releases/download/v1.0.0/7z2301-x64.zip' -out $7z_pkg_out $external_prefix/
download_and_expand -url 'https://github.com/simdsoft/1kiss/releases/download/devtools/7z2301-x64.zip' -out $7z_pkg_out $external_prefix/
}
}

Expand Down
6 changes: 3 additions & 3 deletions 1k/config.h.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
** This file is auto generated by https://github.com/axmolengine/buildware.git
** This file is auto generated by https://github.com/simdsoft/1kiss.git
*/
#ifndef BUILDWARE_@LIB_NAME@_REDIRECT_H
#define BUILDWARE_@LIB_NAME@_REDIRECT_H
#ifndef _1KISS_@LIB_NAME@_REDIRECT_H
#define _1KISS_@LIB_NAME@_REDIRECT_H

#if defined(_WIN32)

Expand Down
6 changes: 3 additions & 3 deletions 1k/config_ab.h.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
** This file is auto generated by https://github.com/axmolengine/buildware.git
** This file is auto generated by https://github.com/simdsoft/1kiss.git
*/
#ifndef BUILDWARE_@LIB_NAME@_REDIRECT_H
#define BUILDWARE_@LIB_NAME@_REDIRECT_H
#ifndef _1KISS_@LIB_NAME@_REDIRECT_H
#define _1KISS_@LIB_NAME@_REDIRECT_H

#if defined(_WIN32)
# include "win32/@INC_DIR@@CONF_HEADER@"
Expand Down
25 changes: 10 additions & 15 deletions 1k/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,23 +212,18 @@ function dist_lib {

if [ "$verinfo_file" != "" ] ; then
eval $(parse_yaml "$verinfo_file")
if [ "$ver" != "" ] ; then
if [ "$rev" = "" ] ; then # no rev, not a git repo
echo "$LIB_NAME: $ver" >> "$DIST_VERLIST"
echo "- $LIB_NAME: $ver" >> "$DIST_NOTES"
else
if [ "$branch" != "" ] && [ "$branch" != "master" ] ; then
eval $(parse_yaml "src/${LIB_NAME}/build.yml")
if [ "$ver" != "" ] ; then
echo "$LIB_NAME: $ver-$rev" >> "$DIST_VERLIST"
echo "- $LIB_NAME: $ver-$rev" >> "$DIST_NOTES"
else
echo "$LIB_NAME: $branch-$rev" >> "$DIST_VERLIST"
echo "- $LIB_NAME: $branch-$rev" >> "$DIST_NOTES"
fi
else
echo "$LIB_NAME: git $rev" >> "$DIST_VERLIST"
echo "- $LIB_NAME: git $rev" >> "$DIST_NOTES"
fi
else # have rev, is a git repo
if [ "$branch" != "" ] ; then
eval $(parse_yaml "src/${LIB_NAME}/build.yml")
echo "$LIB_NAME: $ver-$rev" >> "$DIST_VERLIST"
echo "- $LIB_NAME: $ver-$rev" >> "$DIST_NOTES"
else
echo "$LIB_NAME: git $rev" >> "$DIST_VERLIST"
echo "- $LIB_NAME: git $rev" >> "$DIST_NOTES"
fi
fi
else
# read version from src/${LIB_NAME}/build.yml
Expand Down
33 changes: 17 additions & 16 deletions 1k/fetchd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if ($folder_name.EndsWith('.tar')) {
}
$lib_src = Join-Path $prefix $folder_name

function download_repo($url, $out) {
function fetch_repo($url, $out) {
if (!$url.EndsWith('.git')) {
download_file $url $out
if ($out.EndsWith('.zip')) {
Expand Down Expand Up @@ -75,11 +75,12 @@ if (!(Test-Path $sentry -PathType Leaf)) {
}
elseif ($url.EndsWith('.zip')) {
$out_file = Join-Path $cache_dir "${folder_name}.zip"
} else {
}
else {
$out_file = $null
}

download_repo -url $url -out $out_file
fetch_repo -url $url -out $out_file

if (Test-Path $lib_src -PathType Container) {
New-Item $sentry -ItemType File
Expand All @@ -98,26 +99,26 @@ if ($is_git_repo) {

$new_rev_hash = $(git -C $lib_src rev-parse HEAD)

if(!$is_rev_modified) {
if (!$is_rev_modified) {
$is_rev_modified = $old_rev_hash -ne $new_rev_hash
}
}

if ($is_rev_modified) {
$branch_name = $(git -C $lib_src branch --show-current)
$sentry_content = "ver: $version"
if ($branch_name) {
git pull
$commits = $(git -C $lib_src rev-list --count HEAD)
$sentry_content += "`nbranch: $branch_name"
$sentry_content += "`ncommits: $commits"

# track branch change revision to latest short commit hash of branch
$revision = $(git -C $lib_src rev-parse --short=7 HEAD)
}
if ($version -ne $revision) {
$sentry_content += "`nrev: $revision"

if ($is_git_repo) {
$branch_name = $(git -C $lib_src branch --show-current)
if ($branch_name) { # track branch
git pull
$commits = $(git -C $lib_src rev-list --count HEAD)
$sentry_content += "`nbranch: $branch_name"
$sentry_content += "`ncommits: $commits"
$revision = $(git -C $lib_src rev-parse --short=7 HEAD)
$sentry_content += "`nrev: $revision"
}
}

[System.IO.File]::WriteAllText($sentry, $sentry_content)
}

Expand Down
16 changes: 14 additions & 2 deletions 1k/ios.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# The minimal ios toolchain file: https://github.com/yasio/yasio/blob/dev/cmake/ios.cmake
# version: 4.1.1
# version: 4.1.2
#
# The supported params:
# PLAT: iOS, tvOS, default: iOS
Expand Down Expand Up @@ -84,13 +84,25 @@ if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET} CACHE STRING "")
endif()

if(SIMULATOR)
if (NOT SIMULATOR)
if(PLAT STREQUAL "iOS")
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
elseif(PLAT STREQUAL "tvOS")
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-appletvos")
elseif(PLAT STREQUAL "watchOS")
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-watchos")
endif()
else()
if (PLAT STREQUAL "iOS")
set(_SDK_NAME "iphonesimulator")
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
elseif(PLAT STREQUAL "tvOS")
set(_SDK_NAME "appletvsimulator")
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-tvsimulator")

elseif(PLAT STREQUAL "watchOS")
set(_SDK_NAME "watchsimulator")
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-watchsimulator")
else()
message(FATAL_ERROR "PLAT=${PLAT} unsupported!")
endif()
Expand Down
93 changes: 0 additions & 93 deletions 1k/nsdk1k.cpp

This file was deleted.

74 changes: 74 additions & 0 deletions 1k/xcutils.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# query sdk name by xcode version
$xcode_sdks_map = @{
'osx' =
@{
'13.1.0' = '12.0'
'13.2.1' = '12.1'
'13.3.1' = '12.3'
'13.4.0' = '12.3'
'13.4.1' = '12.3'
'14.0.1' = '12.3'
'14.1.0' = '13.0'
'14.2.0' = '13.1'
'14.3.1' = '13.3'
'15.0.1' = '14.0'
}

'ios' =
@{
'13.1.0' = '15.0'
'13.2.1' = '15.2'
'13.3.1' = '15.4'
'13.4.0' = '15.5'
'13.4.1' = '15.5'
'14.0.1' = '16.0'
'14.1.0' = '16.1'
'14.2.0' = '16.2'
'14.3.1' = '16.4'
'15.0.1' = '17.0'
}
'tvos' =
@{
'13.1.0' = '15.0'
'13.2.1' = '15.2'
'13.3.1' = '15.4'
'13.4.0' = '15.4'
'13.4.1' = '15.4'
'14.0.1' = '16.0'
'14.1.0' = '16.1'
'14.2.0' = '16.1'
'14.3.1' = '16.4'
'15.0.1' = '17.0'
}
'watchos' =
@{
'13.1.0' = '8.0'
'13.2.1' = '8.3'
'13.3.1' = '8.5'
'13.4.1' = '8.5'
'14.0.1' = '9.0'
'14.1.0' = '9.1'
'14.2.0' = '9.1'
'14.3.1' = '9.4'
'15.0.1' = '10.0'
}
};

function xcode_get_sdkname($xcode_ver, $target, $simulator = $false) {
$xcode_ver_nums = $xcode_ver.Split('.')
if ($xcode_ver_nums.Count -lt 3) {
$xcode_ver += '.0'
}
$target_sdks = $xcode_sdks_map[$target]
if ($target_sdks) {
$sdk_ver = $target_sdks[$xcode_ver]
if ($sdk_ver) {
switch ($target) {
'osx' { Write-Output "macosx$sdk_ver" }
'ios' { Write-Output "$(@('iphoneos', 'iphonesimulator')[$simulator])$sdk_ver" }
'tvos' { Write-Output "$(@('appletvos', 'appletvsimulator')[$simulator])$sdk_ver" }
'watchos' { Write-Output "$(@('watchos', 'watchsimulator')[$simulator])$sdk_ver" }
}
}
}
}
Loading

0 comments on commit ddaeeed

Please sign in to comment.