Skip to content

Commit 4a00689

Browse files
authored
Fix CI to work in the warpdotdev/warp repo. (#9226)
## Description A couple issues that needed fixing: * Using `--all-features` and `--all-targets` causes us to try to build the first-party binaries with embedded configuration, which isn't available from this repository. To unblock CI, we'll only run clippy on the default feature set for right now. * Similarly, testing compilation with release configuration was trying to build the `dev` channel; this switches that over to the `oss` channel.
1 parent 0ca787c commit 4a00689

7 files changed

Lines changed: 49 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,8 @@ jobs:
510510
if [ "${{ matrix.os }}" = "windows" ]; then
511511
cargo clippy --locked --workspace ${{ matrix.clippy_excludes }} --all-targets --tests -- -D warnings
512512
else
513-
cargo clippy --locked --workspace ${{ matrix.clippy_excludes }} --all-targets --all-features --tests -- -D warnings
513+
# TODO(vorporeal): Re-enable the `all-features` flag once we've fixed things.
514+
cargo clippy --locked --workspace ${{ matrix.clippy_excludes }} --all-targets --tests -- -D warnings
514515
# Run clippy on warp_completer with default, rather than all features enabled, because there is
515516
# feature-gated logic for the WIP completions-on-js implementation.
516517
cargo clippy --locked -p warp_completer --all-targets --tests -- -D warnings
@@ -653,9 +654,9 @@ jobs:
653654
shell: bash
654655
run: |
655656
if ${{ matrix.os == 'wasm' }}; then
656-
./script/wasm/bundle --bin dev --nouniversal --check-only
657+
./script/wasm/bundle --channel oss --nouniversal --check-only
657658
else
658-
./script/bundle --bin dev --nouniversal --check-only
659+
./script/bundle --channel oss --nouniversal --check-only
659660
fi
660661
env:
661662
# Attach the GitHub auth token so that requests to the GitHub API

script/linux/bundle

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,23 @@ elif [[ $RELEASE_CHANNEL = "stable" ]]; then
164164
WARP_BIN="stable"
165165
BINARY_NAME="warp"
166166
APP_NAME="Warp"
167+
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
168+
WARP_BIN="warp-oss"
169+
BINARY_NAME="warp-oss"
170+
APP_NAME="WarpOss"
171+
# The OSS channel does not ship Sentry, so drop the crash_reporting feature
172+
# (which would otherwise pull in the Sentry SDK as a dependency).
173+
FEATURES="release_bundle"
167174
fi
168175

169176
# Artifact-specific binary naming
170177
if [[ "$ARTIFACT" == "cli" ]]; then
171-
# For CLI artifacts, use oz instead of warp as the binary name
172-
BINARY_NAME="${BINARY_NAME/warp/oz}"
178+
# For CLI artifacts, use oz instead of warp as the binary name. The OSS
179+
# channel is an exception: its CLI command name is `warp-oss`, matching
180+
# `Channel::cli_command_name` in the Rust source.
181+
if [[ $RELEASE_CHANNEL != "oss" ]]; then
182+
BINARY_NAME="${BINARY_NAME/warp/oz}"
183+
fi
173184
fi
174185

175186
# Artifact-specific configuration

script/macos/bundle

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ while (( "$#" )); do
184184
OPEN_AFTER_BUNDLE=true
185185
shift
186186
;;
187-
# Specify the release channel (local, dev, preview, stable)
187+
# Specify the release channel (local, dev, preview, stable, oss)
188188
-c|--channel)
189189
if [ -n "$2" ] && [ "${2:0:1}" != "-" ]; then
190190
RELEASE_CHANNEL=$2
@@ -296,6 +296,14 @@ elif [[ $RELEASE_CHANNEL = "stable" ]]; then
296296
BUNDLE_ID="dev.warp.Warp-Stable"
297297
WARP_APP_NAME="Warp"
298298
WARP_SCHEME_NAME="warp"
299+
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
300+
WARP_BIN="warp-oss"
301+
BUNDLE_ID="dev.warp.WarpOss"
302+
WARP_APP_NAME="WarpOss"
303+
WARP_SCHEME_NAME="warposs"
304+
# The OSS channel does not ship Sentry, so drop the cocoa_sentry feature
305+
# (which would otherwise pull in the Sentry framework dependency).
306+
FEATURES="release_bundle,extern_plist"
299307
fi
300308

301309
OUT_DIR="target/$TARGET_PROFILE_DIR/bundle/osx"
@@ -510,9 +518,12 @@ if [[ "$ARTIFACT" == "app" ]]; then
510518
"$WORKSPACE_ROOT_DIR/script/prepare_bundled_pprof" "$HELPERS_DIR"
511519
fi
512520

513-
# Determine CLI wrapper script path based on release channel
521+
# Determine CLI wrapper script path based on release channel. Each channel's
522+
# value here must match `Channel::cli_command_name` in the Rust source.
514523
if [[ $RELEASE_CHANNEL = "stable" ]]; then
515524
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/oz"
525+
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
526+
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/warp-oss"
516527
else
517528
CLI_SCRIPT_PATH="$BUNDLED_RESOURCES_DIR/bin/oz-$RELEASE_CHANNEL"
518529
fi

script/presubmit

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ echo "Cargo fmt succeeded..."
2020

2121
echo "Running clippy..."
2222
# Exclude warp_completer because we run clippy on it with default features (rather than all features) below.
23-
cargo clippy --workspace --exclude warp_completer --all-targets --all-features --tests -- -D warnings
23+
#
24+
# TODO(vorporeal): Re-enable the `all-features` flag once we've fixed things.
25+
cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warnings
2426
# Run clippy on warp_completer with default, rather than all features enabled, because there is
2527
# feature-gated logic for the WIP completions-on-js implementation.
2628
cargo clippy -p warp_completer --all-targets --tests -- -D warnings

script/wasm/bundle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ elif [[ $RELEASE_CHANNEL = "preview" ]]; then
126126
FEATURES="$FEATURES,preview_channel"
127127
elif [[ $RELEASE_CHANNEL = "stable" ]]; then
128128
WARP_BIN="stable"
129+
elif [[ $RELEASE_CHANNEL = "oss" ]]; then
130+
WARP_BIN="warp-oss"
129131
fi
130132

131133
if [ -n "${FEATURES_OVERRIDE+x}" ]; then

script/windows/bundle.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Param (
99
[Alias('check-only')]
1010
[Switch]$CHECK_ONLY,
1111

12-
[ValidateSet('local', 'dev', 'preview', 'stable')]
12+
[ValidateSet('local', 'dev', 'preview', 'stable', 'oss')]
1313
[String]$CHANNEL = 'dev',
1414

1515
[Alias('release-tag')]
@@ -109,6 +109,13 @@ if ("$CHANNEL" -eq 'local') {
109109
$APP_NAME = 'Warp'
110110
# TODO(vorporeal): Remove this once we get tests passing with this default enabled.
111111
$FEATURES = "$FEATURES,nld_improvements"
112+
} elseif ("$CHANNEL" -eq 'oss') {
113+
$WARP_BIN = 'warp-oss'
114+
$BINARY_NAME = 'warp-oss.exe'
115+
$APP_NAME = 'WarpOss'
116+
# The OSS channel does not ship Sentry, so drop the crash_reporting feature
117+
# (which would otherwise pull in the Sentry SDK as a dependency).
118+
$FEATURES = 'release_bundle,gui,nld_improvements'
112119
}
113120

114121
$BINARY_PATH = "$CARGO_TARGET_OUTPUT_DIR\$BINARY_NAME"

script/windows/windows-installer.iss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
((ReleaseChannel == "preview") ? "Preview" : \
2929
((ReleaseChannel == "local") ? "Local" : \
3030
((ReleaseChannel == "integration") ? "Integration" : \
31-
"Unknown"))))
31+
((ReleaseChannel == "oss") ? "Oss" : \
32+
"Unknown")))))
3233
#define AppMutexName "Local\Warp" + ChannelPascalCase + "_SingleInstance"
3334

3435

@@ -226,9 +227,12 @@ begin
226227
if not DirExists(BinDir) then
227228
CreateDir(BinDir);
228229
229-
{ Determine the channel-specific script name. }
230+
{ Determine the channel-specific script name. These values must match
231+
`Channel::cli_command_name` in the Rust source. }
230232
#if ReleaseChannel == "stable"
231233
CmdScriptName := 'oz.cmd'
234+
#elif ReleaseChannel == "oss"
235+
CmdScriptName := 'warp-oss.cmd';
232236
#else
233237
CmdScriptName := 'oz-{#ReleaseChannel}.cmd';
234238
#endif

0 commit comments

Comments
 (0)