From 7a3ecc291d1c6ac8673a486488f2d27ab08d8b63 Mon Sep 17 00:00:00 2001 From: Bao Zhiyuan <71200607+bzy-debug@users.noreply.github.com> Date: Thu, 22 Aug 2024 17:44:30 +0800 Subject: [PATCH] install bleeding moonrun (#189) Co-authored-by: Bao Zhiyuan --- .github/workflows/ci.yml | 15 +++++++++------ .github/workflows/test-on-main.yml | 9 +++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a63492bd..c3c2f962 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,22 +129,23 @@ jobs: - name: install MoonBit(Unix) if: ${{ matrix.os != 'windows-latest' }} run: | - curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m).tar.gz --output moonbit.tar.gz + mkdir -p ~/.moon/bin + mkdir -p ~/.moon/lib tar xf moonbit.tar.gz --directory ~/.moon/bin/ + curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m)/moonrun --output ~/.moon/bin/moonrun chmod +x ~/.moon/bin/moon* - rm -rf ~/.moon/lib/core && git clone --depth 1 https://github.com/moonbitlang/core.git ~/.moon/lib/core + git clone --depth 1 https://github.com/moonbitlang/core.git ~/.moon/lib/core echo "$HOME/.moon/bin" >> $GITHUB_PATH - name: install MoonBit(Windows) if: ${{ matrix.os == 'windows-latest' }} run: | - irm https://cli.moonbitlang.com/install/powershell.ps1 | iex Invoke-WebRequest -Uri https://cli.moonbitlang.com/moon-ci/Windows-x86_64.zip -OutFile moonbit.zip New-Item -ItemType Directory -Force -Path "$env:USERPROFILE/.moon/bin" New-Item -ItemType Directory -Force -Path "$env:USERPROFILE/.moon/lib" Expand-Archive -Path "moonbit.zip" -DestinationPath "$env:USERPROFILE/.moon/bin/" -Force - Remove-Item -Recurse -Force -Path "$HOME/.moon/lib/core" + Invoke-WebRequest -Uri https://cli.moonbitlang.com/moon-ci/Windows-x86_64/moonrun.exe -OutFile "$env:USERPROFILE/.moon/bin/moonrun.exe" git clone --depth 1 https://github.com/moonbitlang/core.git "$env:USERPROFILE/.moon/lib/core" "$env:USERPROFILE\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append @@ -207,11 +208,13 @@ jobs: - name: install MoonBit(Unix) run: | - curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m).tar.gz --output moonbit.tar.gz + mkdir -p ~/.moon/bin + mkdir -p ~/.moon/lib tar xf moonbit.tar.gz --directory ~/.moon/bin/ + curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m)/moonrun --output ~/.moon/bin/moonrun chmod +x ~/.moon/bin/moon* - rm -rf ~/.moon/lib/core && git clone --depth 1 https://github.com/moonbitlang/core.git ~/.moon/lib/core + git clone --depth 1 https://github.com/moonbitlang/core.git ~/.moon/lib/core echo "$HOME/.moon/bin" >> $GITHUB_PATH - name: install cargo-tarpaulin ${{ env.CARGO_TARPAULIN_VERSION }} diff --git a/.github/workflows/test-on-main.yml b/.github/workflows/test-on-main.yml index 679e1a28..e6964ddf 100644 --- a/.github/workflows/test-on-main.yml +++ b/.github/workflows/test-on-main.yml @@ -61,22 +61,23 @@ jobs: - name: install MoonBit(Unix) if: ${{ matrix.os != 'windows-latest' }} run: | - curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m).tar.gz --output moonbit.tar.gz + mkdir -p ~/.moon/bin + mkdir -p ~/.moon/lib tar xf moonbit.tar.gz --directory ~/.moon/bin/ + curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m)/moonrun --output ~/.moon/bin/moonrun chmod +x ~/.moon/bin/moon* - rm -rf ~/.moon/lib/core && git clone --depth 1 https://github.com/moonbitlang/core.git ~/.moon/lib/core + git clone --depth 1 https://github.com/moonbitlang/core.git ~/.moon/lib/core echo "$HOME/.moon/bin" >> $GITHUB_PATH - name: install MoonBit(Windows) if: ${{ matrix.os == 'windows-latest' }} run: | - irm https://cli.moonbitlang.com/install/powershell.ps1 | iex Invoke-WebRequest -Uri https://cli.moonbitlang.com/moon-ci/Windows-x86_64.zip -OutFile moonbit.zip New-Item -ItemType Directory -Force -Path "$env:USERPROFILE/.moon/bin" New-Item -ItemType Directory -Force -Path "$env:USERPROFILE/.moon/lib" Expand-Archive -Path "moonbit.zip" -DestinationPath "$env:USERPROFILE/.moon/bin/" -Force - Remove-Item -Recurse -Force -Path "$HOME/.moon/lib/core" + Invoke-WebRequest -Uri https://cli.moonbitlang.com/moon-ci/Windows-x86_64/moonrun.exe -OutFile "$env:USERPROFILE/.moon/bin/moonrun.exe" git clone --depth 1 https://github.com/moonbitlang/core.git "$env:USERPROFILE/.moon/lib/core" "$env:USERPROFILE\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append