generated from version-fox/vfox-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support install in windows (#4), require vfox 0.5.3+
* chore: fetch windows verrsions * feat: support windows platform * fix: windows install, ungly * chore(e2e): e2e test pull request * chore(e2e): speed up test * chore(e2e): test in windows * chore: fix e2e * chore: Invoke vfox * chore: e2e let it crash * chore: peek test env * fix: test in macos * chore: check windows test result * docs: update READMe * chore: fix test check in windows * chore: opt windows installation test
- Loading branch information
Showing
14 changed files
with
26,902 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
strategy: | ||
matrix: | ||
# ref: https://github.com/actions/runner-images | ||
os: [ubuntu-20.04, macos-12] | ||
os: [ubuntu-20.04, macos-12, windows-2022] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -31,16 +31,33 @@ jobs: | |
run: | | ||
brew tap version-fox/tap | ||
brew install vfox | ||
- name: install scoop (Windows) | ||
if: runner.os == 'Windows' | ||
uses: MinoruSekine/setup-scoop@v3 | ||
|
||
- name: install vfox (Windows) | ||
if: runner.os == 'Windows' | ||
run: | | ||
scoop install vfox | ||
- name: add vfox-erlang & vfox-elixir plugin | ||
if: runner.os != 'Windows' | ||
run: | | ||
vfox add --source https://github.com/version-fox/vfox-erlang/archive/refs/heads/main.zip erlang | ||
vfox add --source https://github.com/version-fox/vfox-elixir/archive/refs/heads/main.zip elixir | ||
vfox add --source https://github.com/version-fox/vfox-elixir/archive/${GITHUB_REF}.zip elixir | ||
- name: install Erlang/OTP & Elixir by vfox-erlang & vfox-elixir plugin (Darwin) | ||
- name: add vfox-erlang & vfox-elixir plugin | ||
if: runner.os == 'Windows' | ||
run: | | ||
vfox add --source https://github.com/version-fox/vfox-erlang/archive/refs/heads/main.zip erlang | ||
vfox add --source https://github.com/version-fox/vfox-elixir/archive/$env:GITHUB_REF.zip elixir | ||
- name: install Erlang/OTP & Elixir by vfox-erlang & vfox-elixir plugin (Linux) | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk | ||
export MAKEFLAGS=-j4 | ||
vfox install [email protected] | ||
vfox use -g [email protected] | ||
eval "$(vfox activate bash)" | ||
|
@@ -59,6 +76,7 @@ jobs: | |
if: runner.os == 'MacOS' | ||
run: | | ||
brew install autoconf libxslt fop wxwidgets openssl | ||
export MAKEFLAGS=-j4 | ||
vfox install [email protected] | ||
vfox use -g [email protected] | ||
eval "$(vfox activate bash)" | ||
|
@@ -72,4 +90,29 @@ jobs: | |
elixirc -v | ||
cd assets | ||
elixir hello.ex | ||
- name: install Erlang/OTP & Elixir by vfox-erlang & vfox-elixir plugin (Windows) | ||
if: runner.os == 'Windows' | ||
run: | | ||
vfox install [email protected] | ||
vfox use -g [email protected] | ||
Invoke-Expression "$(vfox activate pwsh)" | ||
echo "===============PATH===============" | ||
echo $env:PATH | ||
echo "===============PATH===============" | ||
& erl.exe -eval 'erlang:display({otp_release, erlang:system_info(otp_release)}), halt().' -noshell | ||
vfox install [email protected] | ||
vfox use -g [email protected] | ||
Invoke-Expression "$(vfox activate pwsh)" | ||
Get-Command iex.bat | ||
echo "===============PATH===============" | ||
echo $env:PATH | ||
echo "===============PATH===============" | ||
cd assets | ||
$result = elixirc.bat hello.ex | ||
if ($result -match "Hello world") { | ||
Write-Output "elixir installed successfully!" | ||
} else { | ||
Write-Output "elixir installed failed!" | ||
exit 1 | ||
} |
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 |
---|---|---|
|
@@ -69,3 +69,15 @@ vfox use -g [email protected] | |
``` | ||
|
||
You can reference the E2E test in MacOS 12: [https://github.com/version-fox/vfox-elixir/actions/workflows/e2e_test.yaml](https://github.com/version-fox/vfox-elixir/actions/workflows/e2e_test.yaml) | ||
|
||
## install ELixir in Windows platform | ||
|
||
You should use the v.0.5.3+ vfox version to add vfox-elixir plugin in Wondows platform. **Only support install Elixir versions after v1.15**, Elixir versions before v1.15 can also be installed using the deprecated [Online Elixir Installer](https://github.com/elixir-lang/elixir-windows-setup/releases/tag/v2.4). | ||
|
||
```shell | ||
# Get avaliable version | ||
vfox search elixir | ||
|
||
# install an specific version | ||
vfox use [email protected] | ||
``` |
Oops, something went wrong.