Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: windows support #114

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
21 changes: 18 additions & 3 deletions .github/workflows/test-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ on:
branches: [main]
jobs:
default:
runs-on: ubuntu-latest
strategy:
matrix:
env:
- runs-on: windows-latest
- runs-on: ubuntu-latest
runs-on: ${{ matrix.env.runs-on }}
steps:
- uses: actions/checkout@v3
- uses: ./
Expand All @@ -20,7 +25,12 @@ jobs:
- run: github-comment -v
working-directory: tests
set-absolute-path:
runs-on: ubuntu-latest
strategy:
matrix:
env:
- runs-on: windows-latest
- runs-on: ubuntu-latest
runs-on: ${{ matrix.env.runs-on }}
steps:
- uses: actions/checkout@v3
- uses: ./
Expand All @@ -30,7 +40,12 @@ jobs:
working_directory: tests
- run: /tmp/bin/aqua -v
set-relative-path:
runs-on: ubuntu-latest
strategy:
matrix:
env:
- runs-on: windows-latest
- runs-on: ubuntu-latest
runs-on: ${{ matrix.env.runs-on }}
steps:
- uses: actions/checkout@v3
- uses: ./
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cat aqua-installer | bash
- run: echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> $GITHUB_PATH
- run: bash < aqua-installer
- run: echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> "$GITHUB_PATH"
- run: command -v aqua
- run: aqua -v
set-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cat aqua-installer | bash -s -- -v v0.1.0-9
- run: echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> $GITHUB_PATH
- run: bash -s -- -v v0.1.0-9 < aqua-installer
- run: echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" >> "$GITHUB_PATH"
- run: command -v aqua
- run: aqua -v
set-absolute-path:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cat aqua-installer | bash -s -- -i /tmp/bin/aqua
- run: bash -s -- -i /tmp/bin/aqua < aqua-installer
- run: /tmp/bin/aqua -v
set-relative-path:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cat aqua-installer | bash -s -- -i bin/aqua
- run: bash -s -- -i bin/aqua < aqua-installer
- run: bin/aqua -v
5 changes: 5 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ runs:
shell: bash
working-directory: ${{ inputs.working_directory }}
if: inputs.enable_aqua_install == 'true'
- run: |
echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be

Suggested change
echo "${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${AQUA_ROOT_DIR:-$env:LOCALAPPDATA/aquaproj-aqua}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

i don't think XDG is a thing on windows.

shell: pwsh
if: runner.os == 'Windows' && inputs.enable_aqua_install == 'true'
working-directory: ${{ inputs.working_directory }}

- run: bash "${{github.action_path}}/action.sh"
working-directory: ${{ inputs.working_directory }}
Expand Down