Skip to content

Commit

Permalink
WIP: temporarily commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pollenjp committed Nov 10, 2024
1 parent 542e828 commit 3f89b56
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 9 deletions.
48 changes: 41 additions & 7 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,61 @@ jobs:
name: dist (${{ matrix.target }})
runs-on: ${{ matrix.os }}
steps:
- name: Prepare
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Prepare for common
run: |
CARGO_HOME="${{ runner.temp }}/.cargo"
echo CARGO_HOME="${CARGO_HOME}" >> "$GITHUB_ENV"
echo "${CARGO_HOME}/bin" >> "$GITHUB_PATH"
- name: Prepare for Linux
if: ${{ contains(matrix.target, 'linux') }}
run: |
XDG_BIN_HOME="${{ runner.temp }}/.local/bin"
{
echo XDG_CONFIG_HOME="${{ runner.temp }}/.config"
echo XDG_CACHE_HOME="${{ runner.temp }}/.cache"
echo XDG_DATA_HOME="${{ runner.temp }}/.local/share"
echo XDG_BIN_HOME="${{ runner.temp }}/.local/bin"
echo CARGO_HOME="${{ runner.temp }}/.cargo"
echo XDG_BIN_HOME="${XDG_BIN_HOME}"
echo PYTHONUSERBASE="${{ runner.temp }}/.local"
} >> "$GITHUB_ENV"
{
echo "${{ runner.temp }}/.local/bin"
echo "${XDG_BIN_HOME}"
} >> "$GITHUB_PATH"
- name: Prepare for MacOS
if: ${{ contains(matrix.target, 'darwin') }}
run: |
PYTHONUSERBASE="${{ runner.temp }}/.local"
echo PYTHONUSERBASE="$PYTHONUSERBASE/.local" >> "$GITHUB_ENV"
echo "$PYTHONUSERBASE/.local/bin" >> "$GITHUB_PATH"
- name: Prepare for Windows
if: ${{ contains(matrix.target, 'windows') }}
run: |
export PYTHONUSERBASE="${{ runner.temp }}/.local"
echo PYTHONUSERBASE="$PYTHONUSERBASE" >> "$GITHUB_ENV"
# Get 'Scripts' path
py_content=$(
cat <<'__PY_CONTENT_EOF__'
import site
from pathlib import Path
user_site_pkgs_path = Path(site.getusersitepackages())
print(user_site_pkgs_path.parent / "Scripts")
__PY_CONTENT_EOF__
)
py_scripts_path=$(python -c "$py_content")
if [[ -z "$py_scripts_path" ]]; then
echo "Failed to get 'Scripts' path" >&2
exit 1
fi
echo "$py_scripts_path" >> "$GITHUB_PATH"
# - name: Install Rust
# run: |
# curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" \
# | sh -s -- --profile minimal --default-toolchain none -y
# echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Update pip
run: python -m pip install --user -U pip
- name: Install cargo-zigbuild (and ziglang)
Expand Down
10 changes: 9 additions & 1 deletion dist-workspace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ windows-archive = ".zip"
# The archive format to use for non-windows builds (defaults .tar.xz)
unix-archive = ".tar.gz"
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "aarch64-unknown-linux-musl", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-pc-windows-msvc"]
targets = [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"x86_64-pc-windows-msvc",
]
# Path that installers should place binaries in
install-path = "CARGO_HOME"
# Whether to install an updater program
Expand Down
3 changes: 3 additions & 0 deletions tee-rs.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
{
"path": "./tools/python-sample/"
},
{
"path": "./tools/delay-sample/"
},
{
"path": "./tools/interactive-input-sample/"
},
Expand Down
2 changes: 1 addition & 1 deletion tools/delay-sample/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "delay-sample"
version = "0.1.0"
version = "0.1.2"
edition = "2021"

[dependencies]

0 comments on commit 3f89b56

Please sign in to comment.