Skip to content

Commit

Permalink
Disable indexing while building (#10)
Browse files Browse the repository at this point in the history
* fix output check

* dep ensure

* new input: `disable_index_while_building`

* missing value options for user input
  • Loading branch information
BirmacherAkos authored Apr 18, 2019
1 parent f7cb45f commit a05b325
Show file tree
Hide file tree
Showing 97 changed files with 25,245 additions and 293 deletions.
113 changes: 65 additions & 48 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 6 additions & 28 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -1,45 +1,23 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true

[[constraint]]
branch = "master"
name = "github.com/bitrise-io/go-steputils"

[[constraint]]
branch = "master"
name = "github.com/bitrise-io/go-utils"

[[constraint]]
branch = "master"
name = "github.com/bitrise-tools/go-steputils"
name = "github.com/bitrise-io/go-xcode"

[[constraint]]
branch = "master"
name = "github.com/bitrise-tools/go-xcode"
name = "github.com/bitrise-io/xcode-project"

[[constraint]]
name = "github.com/bitrise-steplib/steps-xcode-archive"
branch = "master"
name = "github.com/bitrise-tools/xcode-project"

[[constraint]]
branch = "master"
Expand Down
4 changes: 2 additions & 2 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ workflows:
echo "BITRISE_TEST_DIR_PATH (\"$BITRISE_TEST_DIR_PATH\") should be: \"$BITRISE_DEPLOY_DIR/Debug-iphoneos\""
exit 1
fi
if [[ "$BITRISE_DEPLOY_DIR/${SCHEME}_iphoneos12.1-arm64e.xctestrun" != "$BITRISE_XCTESTRUN_FILE_PATH" ]] ; then
echo "BITRISE_XCTESTRUN_FILE_PATH (\"$BITRISE_XCTESTRUN_FILE_PATH\") should be: \"$BITRISE_DEPLOY_DIR/${SCHEME}_iphoneos12.1-arm64e.xctestrun\""
if [[ "$BITRISE_XCTESTRUN_FILE_PATH" =~ "$BITRISE_DEPLOY_DIR/${SCHEME}_iphoneos[0-9]{2}.[0-9]{1,2}-arm64e.xctestrun" ]] ; then
echo "BITRISE_XCTESTRUN_FILE_PATH (\"$BITRISE_XCTESTRUN_FILE_PATH\") should be: \"$BITRISE_DEPLOY_DIR/${SCHEME}_iphoneos{{sdk-version}}-arm64e.xctestrun\""
exit 1
fi
Expand Down
26 changes: 14 additions & 12 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,31 @@ import (
"strings"
"time"

"github.com/bitrise-io/go-steputils/output"
"github.com/bitrise-io/go-steputils/stepconf"
"github.com/bitrise-io/go-steputils/tools"
"github.com/bitrise-io/go-utils/command"
"github.com/bitrise-io/go-utils/errorutil"
"github.com/bitrise-io/go-utils/log"
"github.com/bitrise-io/go-utils/pathutil"
"github.com/bitrise-io/go-utils/stringutil"
"github.com/bitrise-io/steps-xcode-archive/utils"
"github.com/bitrise-tools/go-steputils/output"
"github.com/bitrise-tools/go-steputils/stepconf"
"github.com/bitrise-tools/go-steputils/tools"
"github.com/bitrise-tools/go-xcode/xcodebuild"
"github.com/bitrise-tools/go-xcode/xcpretty"
"github.com/bitrise-tools/xcode-project/serialized"
"github.com/bitrise-tools/xcode-project/xcworkspace"
"github.com/bitrise-io/go-xcode/xcodebuild"
"github.com/bitrise-io/go-xcode/xcpretty"
"github.com/bitrise-io/xcode-project/serialized"
"github.com/bitrise-io/xcode-project/xcworkspace"
"github.com/bitrise-steplib/steps-xcode-archive/utils"
shellquote "github.com/kballard/go-shellquote"
)

const bitriseXcodeRawResultTextEnvKey = "BITRISE_XCODE_RAW_RESULT_TEXT_PATH"

// Config ...
type Config struct {
ProjectPath string `env:"project_path,required"`
Scheme string `env:"scheme,required"`
Configuration string `env:"configuration"`
Destination string `env:"destination,required"`
ProjectPath string `env:"project_path,required"`
Scheme string `env:"scheme,required"`
Configuration string `env:"configuration"`
Destination string `env:"destination,required"`
DisableIndexWhileBuilding bool `env:"disable_index_while_building,opt[yes,no]"`

XcodebuildOptions string `env:"xcodebuild_options"`
OutputDir string `env:"output_dir,required"`
Expand Down Expand Up @@ -126,6 +127,7 @@ func main() {
xcodeBuildCmd.SetCustomBuildAction("build-for-testing")
xcodeBuildCmd.SetDestination(cfg.Destination)
xcodeBuildCmd.SetCustomOptions(customOptions)
xcodeBuildCmd.SetDisableIndexWhileBuilding(cfg.DisableIndexWhileBuilding)

// save the build time frame to find the build generated artifacts
var buildStartTime time.Time
Expand Down
20 changes: 20 additions & 0 deletions step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ inputs:
Specify destination to build the testes for.
For available values call: `man xcodebuild` and check _Destinations_ section.
is_required: "true"
- disable_index_while_building: "yes"
opts:
title: Disable indexing during the build
summary: Could make the build faster by disabling the indexing during the build run.
description: |-
Could make the build faster by adding `COMPILER_INDEX_STORE_ENABLE=NO` flag to the `xcodebuild` command which will disable the indexing during the build.
Indexing is needed for
* Autocomplete
* Ability to quickly jump to definition
* Get class and method help by alt clicking.
Which are not needed in CI environment.
**Note:** In Xcode you can turn off the `Index-WhileBuilding` feature by disabling the `Enable Index-WhileBuilding Functionality` in the `Build Settings`.<br/>
In CI environment you can disable it by adding `COMPILER_INDEX_STORE_ENABLE=NO` flag to the `xcodebuild` command.
value_options:
- "yes"
- "no"
- xcodebuild_options: ""
opts:
category: Debug
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a05b325

Please sign in to comment.