-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix build failing because of webrtc-based code (#3)
* fixes for webrtc-livekit, refactor with shared build action
- Loading branch information
Showing
3 changed files
with
104 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: Zed Build | ||
description: Perform a Zed build for Windows | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check LongPathsEnabled first | ||
shell: pwsh | ||
run: | | ||
(Get-ItemProperty "HKLM:System\CurrentControlSet\Control\FileSystem").LongPathsEnabled | ||
- name: Enable long paths in Windows | ||
shell: pwsh | ||
run: | | ||
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force | ||
git config --global core.longpaths true | ||
- name: Check LongPathsEnabled after | ||
shell: pwsh | ||
run: | | ||
(Get-ItemProperty "HKLM:System\CurrentControlSet\Control\FileSystem").LongPathsEnabled | ||
- name: Extract toolchain channel | ||
id: extract_toolchain | ||
working-directory: ${{ github.workspace }}\zed | ||
shell: bash | ||
run: | | ||
TOOLCHAIN_CHANNEL=$(grep 'channel' rust-toolchain.toml | cut -d '"' -f 2) | ||
echo "Toolchain channel: $TOOLCHAIN_CHANNEL" | ||
echo "TOOLCHAIN_CHANNEL=$TOOLCHAIN_CHANNEL" >> $GITHUB_OUTPUT | ||
- name: Setup Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ steps.extract_toolchain.outputs.TOOLCHAIN_CHANNEL }} | ||
target: "wasm32-wasip1" | ||
components: "rustfmt, clippy" | ||
|
||
- name: Show Rust toolchain info | ||
shell: pwsh | ||
run: | | ||
rustc --version | ||
rustup show | ||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v2 | ||
with: | ||
msbuild-architecture: x64 | ||
|
||
- name: Install Windows 10 SDK | ||
uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 | ||
with: | ||
sdk-version: 26100 | ||
|
||
- name: Build project | ||
working-directory: ${{ github.workspace }}\zed | ||
shell: pwsh | ||
# zed may be set to run the exe after the build, this | ||
# won't work in an headless environment. The build at this | ||
# point is likely to have completed successfully. | ||
continue-on-error: true | ||
env: | ||
RUSTFLAGS: "-C symbol-mangling-version=v0 --cfg tokio_unstable --cfg windows_slim_errors -C target-feature=+crt-static --cfg gles" | ||
run: | | ||
cargo run --release --verbose | ||
- name: Show build artifacts | ||
working-directory: ${{ github.workspace }}/zed | ||
shell: bash | ||
run: | | ||
ls -la target/release | ||
- name: Check build artifacts | ||
working-directory: ${{ github.workspace }}/zed | ||
shell: bash | ||
run: | | ||
if [ ! -f ./target/release/zed.exe ]; then | ||
echo "zed.exe not found. Build likely to have failed." | ||
exit 1 | ||
fi | ||
- name: Compress build artifacts | ||
working-directory: ${{ github.workspace }}\zed\target\release | ||
shell: pwsh | ||
run: | | ||
Compress-Archive -Path zed.exe -Destination zed.zip | ||
Compress-Archive -Path zed.pdb -Destination zed.pdb.zip | ||
- name: Calculate SHA256 checksum | ||
working-directory: ${{ github.workspace }}/zed/target/release | ||
shell: bash | ||
run: | | ||
sha256sum zed.exe > zed.exe.sha256 | ||
sha256sum zed.zip > zed.zip.sha256 | ||
sha256sum zed.pdb.zip > zed.pdb.zip.sha256 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters