Skip to content

Commit

Permalink
Update build-linux-amd64.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
LizJeong authored Jul 18, 2024
1 parent 36ddf42 commit 638f79b
Showing 1 changed file with 14 additions and 25 deletions.
39 changes: 14 additions & 25 deletions .github/workflows/build-linux-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jobs:

- name: Set environment variables
run: |
L1_NETWORK_NAME="initiation-1"
echo "L1_NETWORK_NAME=${L1_NETWORK_NAME}" >> $GITHUB_ENV
echo "GOARCH=${{ inputs.arch }}" >> $GITHUB_ENV
echo "GOOS=linux" >> $GITHUB_ENV
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
Expand All @@ -57,36 +55,27 @@ jobs:
else
echo "ARCH_NAME=${{ inputs.arch }}" >> $GITHUB_ENV
fi
- name: Print environment variables
run: |
echo "GOARCH=${GOARCH}"
echo "GOOS=${GOOS}"
echo "VERSION=${VERSION}"
echo "L1_NETWORK_NAME=${L1_NETWORK_NAME}"
# - name: Build for Linux AMD64
# run: |
# export GOARCH=${GOARCH}
# export GOOS=${GOOS}
# make build-linux-with-shared-library
# cd ./build
# mkdir -p initia_${VERSION}
# mv libmovevm.so initia_${VERSION}/libmovevm.${ARCH_NAME}.so
# mv libcompiler.so initia_${VERSION}/libcompiler.${ARCH_NAME}.so
# mv initiad initia_${VERSION}/
# tar -czvf initia_${VERSION}_Linux_${ARCH_NAME}.tar.gz initia_${VERSION}

- name: Build for Linux AMD64
run: |
cd ../initia \
&& make build \
&& cd ./build \
&& cp ~/go/pkg/mod/github.com/initia-labs/movevm@"$MOVEVM_VERSION"/api/libmovevm.dylib ./ \
&& cp ~/go/pkg/mod/github.com/initia-labs/movevm@"$MOVEVM_VERSION"/api/libcompiler.dylib ./ \
&& tar -czvf initia_"$VERSION"_Darwin_"$ARCH_NAME".tar.gz initiad libmovevm.dylib libcompiler.dylib \
&& mv ./initia_"$VERSION"_Darwin_"$ARCH_NAME".tar.gz $GITHUB_WORKSPACE/ \
&& rm -rf ./libmovevm.dylib ./libcompiler.dylib ./initiad
export GOARCH=${GOARCH}
export GOOS=${GOOS}
make build-linux-with-shared-library
cd ./build
mkdir -p initia_${VERSION}
mv libmovevm.so initia_${VERSION}/libmovevm.${ARCH_NAME}.so
mv libcompiler.so initia_${VERSION}/libcompiler.${ARCH_NAME}.so
mv initiad initia_${VERSION}/
tar -czvf initia_${VERSION}_Linux_${ARCH_NAME}.tar.gz initia_${VERSION}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./build/initia_${{ env.VERSION }}_Linux_${{ env.ARCH_NAME }}.tar.gz
- name: Release
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit 638f79b

Please sign in to comment.