Skip to content

Commit

Permalink
Merge pull request #541 from moonbitlang/tweak_cicd
Browse files Browse the repository at this point in the history
internal: tweak ci cd for new toolchain layout
  • Loading branch information
Young-Flash authored Dec 31, 2024
2 parents 2b6d37f + 2f9dc3c commit 499d6d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ jobs:
curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m).tar.gz --output moonbit.tar.gz
curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m)/mooncake --output mooncake
tar xf moonbit.tar.gz --directory ./tmp-bins/
cp -L ./target/release/moonrun ./tmp-bins/
cp -L ./target/release/moon ./tmp-bins/
cp -L ./mooncake ./tmp-bins/
cp -L ./target/release/moonrun ./tmp-bins/bin/
cp -L ./target/release/moon ./tmp-bins/bin/
cp -L ./mooncake ./tmp-bins/bin/
pushd tmp-bins && shasum -a 256 -- * >../moonbit-darwin-aarch64.sha256 && popd
tar czf ./moonbit-darwin-aarch64.tar.gz --directory=./tmp-bins .
aws s3 cp ./moonbit-darwin-aarch64.tar.gz s3://cli.moonbitlang.com/binaries/bleeding/moonbit-darwin-aarch64.tar.gz
Expand Down Expand Up @@ -150,9 +150,9 @@ jobs:
curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m).tar.gz --output moonbit.tar.gz
curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m)/mooncake --output mooncake
tar xf moonbit.tar.gz --directory ./tmp-bins/
cp -L ./target/release/moonrun ./tmp-bins/
cp -L ./target/release/moon ./tmp-bins/
cp -L ./mooncake ./tmp-bins/
cp -L ./target/release/moonrun ./tmp-bins/bin/
cp -L ./target/release/moon ./tmp-bins/bin/
cp -L ./mooncake ./tmp-bins/bin/
cd tmp-bins && sha256sum -- * >../moonbit-linux-x86_64.sha256 && cd ..
tar czf ./moonbit-linux-x86_64.tar.gz --directory=./tmp-bins .
aws s3 cp ./moonbit-linux-x86_64.tar.gz s3://cli.moonbitlang.com/binaries/bleeding/moonbit-linux-x86_64.tar.gz
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ jobs:
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/
tar xf moonbit.tar.gz --directory ~/.moon/
curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m)/moonrun --output ~/.moon/bin/moonrun
curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m)/mooncake --output ~/.moon/bin/mooncake
chmod +x ~/.moon/bin/moon*
chmod +x ~/.moon/bin/tcc
chmod +x ~/.moon/bin/internal/tcc
git clone --depth 1 https://github.com/moonbitlang/core.git ~/.moon/lib/core
echo "$HOME/.moon/bin" >> $GITHUB_PATH
echo "$GITHUB_WORKSPACE/target/debug" >> $GITHUB_PATH
Expand All @@ -153,7 +153,7 @@ jobs:
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
Expand-Archive -Path "moonbit.zip" -DestinationPath "$env:USERPROFILE/.moon/" -Force
Invoke-WebRequest -Uri https://cli.moonbitlang.com/moon-ci/Windows-x86_64/moonrun.exe -OutFile "$env:USERPROFILE/.moon/bin/moonrun.exe"
Invoke-WebRequest -Uri https://cli.moonbitlang.com/moon-ci/Windows-x86_64/mooncake.exe -OutFile "$env:USERPROFILE/.moon/bin/mooncake.exe"
git clone --depth 1 https://github.com/moonbitlang/core.git "$env:USERPROFILE/.moon/lib/core"
Expand Down Expand Up @@ -324,11 +324,11 @@ jobs:
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/
tar xf moonbit.tar.gz --directory ~/.moon/
curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m)/moonrun --output ~/.moon/bin/moonrun
curl https://cli.moonbitlang.com/moon-ci/$(uname -s)-$(uname -m)/mooncake --output ~/.moon/bin/mooncake
chmod +x ~/.moon/bin/moon*
chmod +x ~/.moon/bin/tcc
chmod +x ~/.moon/bin/internal/tcc
git clone --depth 1 https://github.com/moonbitlang/core.git ~/.moon/lib/core
echo "$HOME/.moon/bin" >> $GITHUB_PATH
echo "$GITHUB_WORKSPACE/target/debug" >> $GITHUB_PATH
Expand Down

0 comments on commit 499d6d2

Please sign in to comment.