Tweaks to test the static upload script

pull/751/head
Morgan Pretty 2 years ago
parent c7f6b5a94e
commit 2833cef5e4

@ -30,8 +30,11 @@ fi
mkdir -v "$base" mkdir -v "$base"
# Copy over the build products # Copy over the build products
cp -av build/Build/Products/App\ Store\ Release-iphonesimulator/Session.app "$base" mkdir build
echo "Test" > "build/test.txt"
cp -av build/test.txt "$base"
# cp -av build/Build/Products/App\ Store\ Release-iphonesimulator/Session.app "$base"
# tar dat shiz up yo # tar dat shiz up yo
archive="$base.tar.xz" archive="$base.tar.xz"

@ -1,64 +1,98 @@
// Intentionally doing a depth of 2 as libSession-util has it's own submodules (and libLokinet likely will as well) // Intentionally doing a depth of 2 as libSession-util has it's own submodules (and libLokinet likely will as well)
local submodule_commands = ['git fetch --tags', 'git submodule update --init --recursive --depth=2']; local clone_submodules = {
name: 'Clone Submodules',
commands: ['git fetch --tags', 'git submodule update --init --recursive --depth=2']
};
// cmake options for static deps mirror // cmake options for static deps mirror
local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https://oxen.rocks/deps ' else ''); local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https://oxen.rocks/deps ' else '');
// xcpretty // xcpretty
local xcpretty_commands = [ local install_xcpretty = {
||| name: 'Install XCPretty',
if [[ $(command -v brew) != "" ]]; then commands: [
brew install xcpretty |||
fi if [[ $(command -v brew) != "" ]]; then
|||, brew install xcpretty
||| fi
if [[ $(command -v brew) == "" ]]; then |||,
gem install xcpretty |||
fi if [[ $(command -v brew) == "" ]]; then
|||, gem install xcpretty
]; fi
|||,
]
};
// Cocoapods
//
// Unfortunately Cocoapods has a dumb restriction which requires you to use UTF-8 for the
// 'LANG' env var so we need to work around the with https://github.com/CocoaPods/CocoaPods/issues/6333
local install_cocoapods = {
name: 'Install CocoaPods',
commands: ['LANG=en_US.UTF-8 pod install']
};
[ [
// Unit tests
{
kind: 'pipeline',
type: 'exec',
name: 'Unit Tests',
platform: { os: 'darwin', arch: 'amd64' },
steps: [
{ name: 'Clone Submodules', commands: submodule_commands },
// { name: 'Install XCPretty', commands: xcpretty_commands },
{ name: 'Install CocoaPods', commands: ['LANG=en_US.UTF-8 pod install'] },
{
name: 'Run Unit Tests',
commands: [
'mkdir build',
'xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro"' // | xcpretty --report html'
],
},
],
},
// Simulator build
{ {
kind: 'pipeline', kind: 'pipeline',
type: 'exec', type: 'exec',
name: 'Simulator Build', name: 'Test Upload',
platform: { os: 'darwin', arch: 'amd64' }, platform: { os: 'darwin', arch: 'amd64' },
steps: [ steps: [
{ name: 'Clone Submodules', commands: submodule_commands },
// { name: 'Install XCPretty', commands: xcpretty_commands },
{ name: 'Install CocoaPods', commands: ['LANG=en_US.UTF-8 pod install'] },
{ {
name: 'Build', name: 'Upload artifacts',
commands: [ commands: [
'mkdir build',
'xcodebuild -workspace Session.xcworkspace -scheme Session -configuration "App Store Release" -sdk iphonesimulator -derivedDataPath ./build -destination "generic/platform=iOS Simulator"', // | xcpretty',
'./.drone-static-upload.sh' './.drone-static-upload.sh'
], ]
}, }
], ]
}, },
// // Unit tests
// {
// kind: 'pipeline',
// type: 'exec',
// name: 'Unit Tests',
// platform: { os: 'darwin', arch: 'amd64' },
// steps: [
// clone_submodules,
// // install_xcpretty,
// install_cocoapods,
// {
// name: 'Run Unit Tests',
// commands: [
// 'mkdir build',
// 'xcodebuild test -workspace Session.xcworkspace -scheme Session -destination "platform=iOS Simulator,name=iPhone 14 Pro"' // | xcpretty --report html'
// ],
// },
// ],
// },
// // Simulator build
// {
// kind: 'pipeline',
// type: 'exec',
// name: 'Simulator Build',
// platform: { os: 'darwin', arch: 'amd64' },
// steps: [
// clone_submodules,
// // install_xcpretty,
// install_cocoapods,
// {
// name: 'Build',
// commands: [
// 'mkdir build',
// 'xcodebuild -workspace Session.xcworkspace -scheme Session -configuration "App Store Release" -sdk iphonesimulator -derivedDataPath ./build -destination "generic/platform=iOS Simulator"' // | xcpretty'
// ],
// },
// {
// name: 'Upload artifacts',
// commands: [
// './.drone-static-upload.sh'
// ]
// }
// ],
// },
// // AppStore build (generate an archive to be signed later) // // AppStore build (generate an archive to be signed later)
// { // {
// kind: 'pipeline', // kind: 'pipeline',
@ -66,9 +100,9 @@ local xcpretty_commands = [
// name: 'AppStore Build', // name: 'AppStore Build',
// platform: { os: 'darwin', arch: 'amd64' }, // platform: { os: 'darwin', arch: 'amd64' },
// steps: [ // steps: [
// { name: 'Clone Submodules', commands: submodule_commands }, // clone_submodules,
// // { name: 'Install XCPretty', commands: xcpretty_commands }, // // install_xcpretty,
// { name: 'Install CocoaPods', commands: ['LANG=en_US.UTF-8 pod install'] }, // install_cocoapods,
// { // {
// name: 'Build', // name: 'Build',
// commands: [ // commands: [

Loading…
Cancel
Save