Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 27 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
default:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest, macos-13]
# TODO: add windows-11-arm: https://github.com/conda-forge/conda-forge.github.io/issues/1940
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest, macos-13]
cache: [true, false]
runs-on: ${{ matrix.os }}
name: default ${{ matrix.cache == true && 'with' || 'without' }} cache (${{ matrix.os }})
Expand Down Expand Up @@ -192,14 +193,14 @@ jobs:
custom-manifest-path:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest, windows-11-arm]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./
with:
cache: false
manifest-path: test/default/pixi.toml
manifest-path: test/bzip2/pixi.toml

different-log-level:
strategy:
Expand Down Expand Up @@ -259,26 +260,26 @@ jobs:
- name: Download pixi binary (Ubuntu)
run: |
set -o pipefail
curl -L --output "$HOME/custom existing pixi/pixi" https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-unknown-linux-musl
curl -L --output "$HOME/custom existing pixi/pixi" https://github.com/prefix-dev/pixi/releases/download/v0.43.0/pixi-x86_64-unknown-linux-musl
chmod +x "$HOME/custom existing pixi/pixi"
if: matrix.os == 'ubuntu-latest'
- name: Download pixi binary (macOS)
run: |
set -o pipefail
curl -L --output "$HOME/custom existing pixi/pixi" https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-apple-darwin
curl -L --output "$HOME/custom existing pixi/pixi" https://github.com/prefix-dev/pixi/releases/download/v0.43.0/pixi-x86_64-apple-darwin
chmod +x "$HOME/custom existing pixi/pixi"
if: matrix.os == 'macos-latest'
- name: Download pixi binary (Windows)
run: |
curl -L --output "$HOME/custom existing pixi/pixi.exe" https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-pc-windows-msvc.exe
curl -L --output "$HOME/custom existing pixi/pixi.exe" https://github.com/prefix-dev/pixi/releases/download/v0.43.0/pixi-x86_64-pc-windows-msvc.exe
if: matrix.os == 'windows-latest'
- run: |
echo "Path: $PATH"
shell: bash
- name: Verify pixi version (before setup-pixi)
run: |
pixi --version
pixi --version | grep -q "pixi 0.14.0"
pixi --version | grep -q "pixi 0.43.0"
shell: bash
- name: Verify pixi path (before setup-pixi)
run: |
Expand All @@ -299,7 +300,7 @@ jobs:
uses: ./
with:
cache: false
pixi-version: v0.16.0
pixi-version: v0.44.0
if: matrix.ignore-reason == 'version'
- name: Run Action (url should overwrite preinstalled pixi)
uses: ./
Expand All @@ -308,10 +309,10 @@ jobs:
pixi-url: |
${{
matrix.os == 'ubuntu-latest' &&
'https://github.com/prefix-dev/pixi/releases/download/v0.16.0/pixi-x86_64-unknown-linux-musl'
'https://github.com/prefix-dev/pixi/releases/download/v0.44.0/pixi-x86_64-unknown-linux-musl'
|| matrix.os == 'macos-latest' &&
'https://github.com/prefix-dev/pixi/releases/download/v0.16.0/pixi-x86_64-apple-darwin'
|| 'https://github.com/prefix-dev/pixi/releases/download/v0.16.0/pixi-x86_64-pc-windows-msvc.exe'
'https://github.com/prefix-dev/pixi/releases/download/v0.44.0/pixi-x86_64-apple-darwin'
|| 'https://github.com/prefix-dev/pixi/releases/download/v0.44.0/pixi-x86_64-pc-windows-msvc.exe'
}}
if: matrix.ignore-reason == 'url'
- name: Create custom bin directory
Expand All @@ -325,23 +326,23 @@ jobs:
# this will implicitly set pixi-version to latest
pixi-bin-path: custom-bin/pixi${{ matrix.os == 'windows-latest' && '.exe' || '' }}
if: matrix.ignore-reason == 'bin-path'
- name: Verify pixi version (after setup-pixi) - still at 0.14.0
- name: Verify pixi version (after setup-pixi) - still at 0.43.0
run: |
pixi --version
pixi --version | grep -q 0.14.0
pixi --version | grep -q 0.43.0
shell: bash
if: matrix.ignore-reason == 'none'
- name: Verify pixi version (after setup-pixi) - should be 0.16.0
- name: Verify pixi version (after setup-pixi) - should be 0.44.0
run: |
pixi --version
pixi --version | grep -q 0.16.0
pixi --version | grep -q 0.44.0
shell: bash
if: matrix.ignore-reason != 'none' && matrix.ignore-reason != 'bin-path' && matrix.ignore-reason != 'version-latest'
- name: Verify pixi version (after setup-pixi) - should be latest
run: |
pixi --version
pixi --version | grep -vq 0.14.0
pixi --version | grep -vq 0.16.0
pixi --version | grep -vq 0.43.0
pixi --version | grep -vq 0.44.0
shell: bash
if: matrix.ignore-reason == 'bin-path' || matrix.ignore-reason == 'version-latest'
- name: Verify pixi path (after setup-pixi, no ignore reason)
Expand Down Expand Up @@ -460,7 +461,8 @@ jobs:
pixi-shell:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# TODO: add windows-11-arm: https://github.com/conda-forge/conda-forge.github.io/issues/1940
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -480,11 +482,14 @@ jobs:
- run: |
python --version | Select-String "3.11"
shell: pixi run pwsh -Command {0}
# TODO investigate: for some reason, this errors on ubuntu-arm
if: matrix.os != 'ubuntu-24.04-arm'

pixi-shell-exec:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# TODO: add windows-11-arm: https://github.com/conda-forge/conda-forge.github.io/issues/1940
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -500,6 +505,8 @@ jobs:
- run: |
python --version | Select-String "3.11"
shell: pixi exec --spec python=3.11.* -- pwsh -Command {0}
# TODO investigate: for some reason, this errors on ubuntu-arm
if: matrix.os != 'ubuntu-24.04-arm'

post-cleanup-linux:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -593,7 +600,7 @@ jobs:
no-lockfile:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m
## Usage

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
pixi-version: v0.44.0

Expand All @@ -35,7 +35,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m

> [!WARNING]
> Since pixi is not yet stable, the API of this action may change between minor versions.
> Please pin the versions of this action to a specific version (i.e., `prefix-dev/[email protected].7`) to avoid breaking changes.
> Please pin the versions of this action to a specific version (i.e., `prefix-dev/[email protected].8`) to avoid breaking changes.
> You can automatically update the version of this action by using [Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot).
>
> Put the following in your `.github/dependabot.yml` file to enable Dependabot for your GitHub Actions:
Expand Down Expand Up @@ -74,7 +74,7 @@ In order to not exceed the [10 GB cache size limit](https://docs.github.com/en/a
This can be done by setting the `cache-write` argument.

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
Expand Down Expand Up @@ -119,7 +119,7 @@ test:
environment: [py311, py312]
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
environments: ${{ matrix.environment }}
```
Expand All @@ -129,7 +129,7 @@ test:
The following example will install both the `py311` and the `py312` environment on the runner.

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
# separated by spaces
environments: >-
Expand Down Expand Up @@ -165,7 +165,7 @@ Specify the token using the `auth-token` input argument.
This form of authentication (bearer token in the request headers) is mainly used at [prefix.dev](https://prefix.dev).

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
auth-host: prefix.dev
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
Expand All @@ -177,7 +177,7 @@ Specify the username and password using the `auth-username` and `auth-password`
This form of authentication (HTTP Basic Auth) is used in some enterprise environments with [artifactory](https://jfrog.com/artifactory) for example.

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
auth-host: custom-artifactory.com
auth-username: ${{ secrets.PIXI_USERNAME }}
Expand All @@ -190,7 +190,7 @@ Specify the conda-token using the `auth-conda-token` input argument.
This form of authentication (token is encoded in URL: `https://my-quetz-instance.com/t/<token>/get/custom-channel`) is used at [anaconda.org](https://anaconda.org) or with [quetz instances](https://github.com/mamba-org/quetz).

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
auth-host: anaconda.org # or my-quetz-instance.com
auth-conda-token: ${{ secrets.CONDA_TOKEN }}
Expand All @@ -202,7 +202,7 @@ Specify the S3 key pair using the `auth-access-key-id` and `auth-secret-access-k
You can also specify the session token using the `auth-session-token` input argument.

```yaml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
auth-host: s3://my-s3-bucket
auth-s3-access-key-id: ${{ secrets.ACCESS_KEY_ID }}
Expand Down Expand Up @@ -274,15 +274,15 @@ To this end, `setup-pixi` adds all environment variables set when executing `pix
As a result, all installed binaries can be accessed without having to call `pixi run`.

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
activate-environment: true
```

If you are installing multiple environments, you will need to specify the name of the environment that you want to be activated.

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
environments: >-
py311
Expand All @@ -299,7 +299,7 @@ You can specify whether `setup-pixi` should run `pixi install --frozen` or `pixi
See the [official documentation](https://prefix.dev/docs/pixi/cli#install) for more information about the `--frozen` and `--locked` flags.

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
locked: true
# or
Expand All @@ -318,7 +318,7 @@ The first one is the debug logging of the action itself.
This can be enabled by running the action with the `RUNNER_DEBUG` environment variable set to `true`.

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
env:
RUNNER_DEBUG: true
```
Expand All @@ -336,7 +336,7 @@ The second type is the debug logging of the pixi executable.
This can be specified by setting the `log-level` input.

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
# one of `q`, `default`, `v`, `vv`, or `vvv`.
log-level: vvv
Expand All @@ -362,7 +362,7 @@ If nothing is specified, `post-cleanup` will default to `true`.
On self-hosted runners, you also might want to alter the default pixi install location to a temporary location. You can use `pixi-bin-path: ${{ runner.temp }}/bin/pixi` to do this.

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
post-cleanup: true
# ${{ runner.temp }}\Scripts\pixi.exe on Windows
Expand All @@ -378,7 +378,7 @@ You can also use a preinstalled local version of pixi on the runner by not setti
This can be overwritten by setting the `manifest-path` input argument.

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
manifest-path: pyproject.toml
```
Expand All @@ -388,7 +388,7 @@ This can be overwritten by setting the `manifest-path` input argument.
If you only want to install pixi and not install the current project, you can use the `run-install` option.

```yml
- uses: prefix-dev/[email protected].7
- uses: prefix-dev/[email protected].8
with:
run-install: false
```
Expand Down
6 changes: 2 additions & 4 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "setup-pixi",
"version": "0.8.7",
"version": "0.8.8",
"private": true,
"description": "Action to set up the pixi package manager.",
"scripts": {
Expand Down
6 changes: 2 additions & 4 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export const getCondaArch = () => {
'linux-x64': 'linux-64',
'linux-arm64': 'linux-aarch64',
'linux-ppc64': 'linux-ppc64le',
'win32-x64': 'win-64'
'win32-x64': 'win-64',
'win32-arm64': 'win-arm64'
}
const arch = archDict[`${os.platform()}-${os.arch()}`]
if (!arch) {
Expand Down Expand Up @@ -52,9 +53,6 @@ export const getPixiUrlFromVersion = (version: string) => {
const arch = getArch()
const platform = getPlatform()
const pixiFile = `pixi-${arch}-${platform}${platform === 'pc-windows-msvc' ? '.exe' : ''}`
if (arch === 'aarch64' && platform === 'pc-windows-msvc') {
throw new Error('Windows on ARM is currently not supported')
}
if (version === 'latest') {
return `https://github.com/prefix-dev/pixi/releases/latest/download/${pixiFile}`
}
Expand Down
Loading
Loading