Skip to content

Commit

Permalink
Merge pull request #316 from codestoryai/features/try-and-build-rust
Browse files Browse the repository at this point in the history
[sidecar][windows] try and build windows
  • Loading branch information
theskcd authored Dec 2, 2023
2 parents 01b1ef3 + 3dda7b8 commit 6ab2391
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/sidecar-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ jobs:
with:
python-version: '3.9'

- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
cargo build --release
# Now run the .sh script which does the building and packaging
- name: Build and package
run: |
./package_windows_bin.sh
# This updates the environment variable
- name: Set CLOUDSDK_PYTHON environment variable
run: echo "CLOUDSDK_PYTHON=$(which python)" >> $GITHUB_ENV
Expand All @@ -60,20 +74,6 @@ jobs:
gcloud config set project ${{ env.GCP_PROJECT_ID }}
# Copy the built binary to the GCP bucket
gsutil cp sidecar_test.7z "gs://sidecar-bin/windows/sidecar_test.zip"
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: |
cargo build --release
# Now run the .sh script which does the building and packaging
- name: Build and package
run: |
./package_windows_bin.sh
# Github action parser for sure, something to test it out too quickly
- name: Compile the 7z
Expand Down
4 changes: 3 additions & 1 deletion difftastic/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ impl TreeSitterParser {
// and https://github.com/Wilfred/difftastic/issues/339.
let rustc_supports_whole_archive = !rustc::is_max_version("1.60.0").unwrap_or(false);

let dir = PathBuf::from(&self.src_dir);
let owned_src_dir = self.src_dir.to_owned();
let dir_parts = owned_src_dir.split('/').into_iter().collect::<Vec<_>>();
let dir = PathBuf::from_iter(dir_parts.into_iter());

let mut c_files = vec!["parser.c"];
let mut cpp_files = vec![];
Expand Down

0 comments on commit 6ab2391

Please sign in to comment.