forked from prefix-dev/pixi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/global-trampoline' into trampoline
- Loading branch information
Showing
196 changed files
with
83,168 additions
and
31,361 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Update Trampoline Binary | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'crates/pixi_trampoline/**' | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- 'crates/pixi_trampoline/**' | ||
|
||
permissions: | ||
contents: write # Allow write permissions for contents (like pushing to the repo) | ||
pull-requests: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
include: | ||
- { name: "Linux-x86_64", target: x86_64-unknown-linux-musl, os: ubuntu-latest } | ||
- { name: "Linux-aarch64", target: aarch64-unknown-linux-musl, os: ubuntu-latest } | ||
- { name: "macOS-x86", target: x86_64-apple-darwin, os: macos-13 } | ||
- { name: "macOS-arm", target: aarch64-apple-darwin, os: macos-14 } | ||
- { name: "Windows", target: x86_64-pc-windows-msvc, os: windows-latest } | ||
- { name: "Windows-arm", target: aarch64-pc-windows-msvc, os: windows-latest } | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch full history so we have branch information | ||
|
||
- name: Set up Rust | ||
uses: taiki-e/setup-cross-toolchain-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
|
||
- name: Build trampoline binary | ||
run: cargo build --release --target ${{ matrix.target }} --package pixi_trampoline | ||
|
||
- name: Move trampoline binary on windows | ||
if: startsWith(matrix.name, 'Windows') | ||
run: | | ||
mkdir -p trampolines-binaries | ||
mv target/${{ matrix.target }}/release/pixi_trampoline.exe trampolines-binaries/pixi-trampoline-${{ matrix.target }}.exe | ||
- name: Move trampoline binary on unix | ||
if: startsWith(matrix.name, 'Windows') == false | ||
run: | | ||
mkdir -p trampolines-binaries | ||
mv target/${{ matrix.target }}/release/pixi_trampoline trampolines-binaries/pixi-trampoline-${{ matrix.target }} | ||
- name: Upload binary artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: trampoline-${{ matrix.target }} | ||
path: trampolines-binaries/ | ||
|
||
aggregate: | ||
runs-on: ubuntu-latest | ||
needs: build # This ensures the aggregation job runs after the build jobs | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download all binaries | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: trampolines-binaries/ | ||
|
||
- name: List downloaded files | ||
run: ls -R trampolines-binaries/ | ||
|
||
- name: Move trampolines | ||
run: | | ||
mkdir -p trampolines | ||
# Iterate through all files in trampolines directory and its subdirectories | ||
find trampolines-binaries -type f -name 'pixi-trampoline-*' -exec mv -f {} trampolines/ \; | ||
ls -R trampolines | ||
- name: Upload binary artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: trampolines | ||
path: trampolines/ | ||
|
||
|
||
|
||
- name: Commit and push updated binaries | ||
# Don't run on forks | ||
if: github.repository == 'prefix-dev/pixi' && startsWith(github.ref, 'reaf/heads') | ||
run: | | ||
# Set the repository to push to the repository the workflow is running on | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git add trampolines/ | ||
git commit -m "[CI]: Update trampoline binaries for all targets" | ||
# Push changes to the branch that triggered the workflow | ||
BRANCH=$(echo "${GITHUB_REF#refs/heads/}") | ||
git push origin HEAD:$BRANCH |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,8 @@ authors: | |
name-particle: de | ||
family-names: Jager | ||
email: [email protected] | ||
repository-code: 'https://github.com/prefix-dev/pixi/releases/tag/v0.32.1' | ||
url: 'https://pixi.sh/v0.32.1' | ||
repository-code: 'https://github.com/prefix-dev/pixi/releases/tag/v0.33.0' | ||
url: 'https://pixi.sh/v0.33.0' | ||
abstract: >- | ||
A cross-platform, language agnostic, package/project | ||
management tool for development in virtual environments. | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.