Skip to content

Commit

Permalink
Fix shellcheck lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofer-Julian committed Nov 11, 2024
1 parent 97fc8c8 commit 65bc2fe
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 24 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,11 @@ jobs:
BIN_PATH="target/${{ matrix.target }}/${CARGO_PROFILE}/${BIN_NAME}"
# Let subsequent steps know where to find the binary
echo "BIN_PATH=${BIN_PATH}" >> $GITHUB_OUTPUT
echo "BIN_NAME=${BIN_NAME}" >> $GITHUB_OUTPUT
echo "EXE_SUFFIX=${EXE_SUFFIX}" >> $GITHUB_OUTPUT
{
echo "BIN_PATH=${BIN_PATH}"
echo "BIN_NAME=${BIN_NAME}"
echo "EXE_SUFFIX=${EXE_SUFFIX}"
} >> $GITHUB_OUTPUT
- name: Build msi Installer
if: startsWith(matrix.name, 'Windows') && matrix.target != 'aarch64-pc-windows-msvc'
run: >
Expand Down Expand Up @@ -297,7 +298,8 @@ jobs:
KEYCHAIN_PATH="$RUNNER_TEMP/$KEYCHAIN_FILENAME"
# create temporary keychain
export KEYCHAIN_PASSWORD=$(openssl rand -base64 32)
KEYCHAIN_PASSWORD=$(openssl rand -base64 32)
export KEYCHAIN_PASSWORD
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
Expand Down Expand Up @@ -327,7 +329,6 @@ jobs:
# notarize binary
xcrun notarytool submit pixi.zip --keychain-profile "$KEYCHAIN_ENTRY" --wait
- name: Create tarball
id: package
shell: bash
Expand Down
54 changes: 36 additions & 18 deletions .github/workflows/trampoline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: Update Trampoline Binary
on:
push:
paths:
- 'crates/pixi_trampoline/**'
- '.github/workflows/trampoline.yaml'
- 'src/global/trampoline.rs'
- "crates/pixi_trampoline/**"
- ".github/workflows/trampoline.yaml"
- "src/global/trampoline.rs"
workflow_dispatch:
pull_request:
paths:
- 'crates/pixi_trampoline/**'
- '.github/workflows/trampoline.yaml'
- 'src/global/trampoline.rs'
- "crates/pixi_trampoline/**"
- ".github/workflows/trampoline.yaml"
- "src/global/trampoline.rs"

permissions:
contents: write # Allow write permissions for contents (like pushing to the repo)
contents: write # Allow write permissions for contents (like pushing to the repo)
pull-requests: write

jobs:
Expand All @@ -27,13 +27,33 @@ jobs:
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: "Linux-powerpc64", target: powerpc64-unknown-linux-gnu, 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 }
- 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: "Linux-powerpc64"
target: powerpc64-unknown-linux-gnu
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
Expand Down Expand Up @@ -72,7 +92,7 @@ jobs:
defaults:
run:
working-directory: crates/pixi_trampoline
needs: build # This ensures the aggregation job runs after the build jobs
needs: build # This ensures the aggregation job runs after the build jobs
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -105,8 +125,6 @@ jobs:
name: trampolines
path: crates/pixi_trampoline/trampolines/



- name: Commit and push updated binaries
# Don't run on forks
if: github.repository == 'prefix-dev/pixi' && startsWith(github.ref, 'reaf/heads')
Expand All @@ -117,5 +135,5 @@ jobs:
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/}")
BRANCH=${GITHUB_REF#refs/heads/}
git push origin HEAD:$BRANCH
88 changes: 88 additions & 0 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ actionlint = ">=1.7.4,<2"
pre-commit = ">=3.7.1,<4"
pre-commit-hooks = ">=4.6.0,<5"
ruff = ">=0.4.8,<0.5"
shellcheck = ">=0.10.0,<0.11"
taplo = ">=0.9.1,<0.10"
typos = ">=1.23.1,<2"

[feature.lint.tasks]
actionlint = { cmd = "actionlint", env = { SHELLCHECK_OPTS = "-e SC2086" } }
check-openssl = "python tests/scripts/check-openssl.py"
lint = "pre-commit run --all-files --hook-stage=manual"
pre-commit-install = "pre-commit install --install-hooks -t=pre-commit -t=pre-push"
Expand Down

0 comments on commit 65bc2fe

Please sign in to comment.