Skip to content

Commit

Permalink
rework packaging - now use only one branch (main) for all architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
neodiX committed Aug 11, 2024
1 parent e4b8743 commit 93a7108
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 73 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
release_name: MyLocalTon v${{ github.run_number }}
body: |
${{ steps.read_release.outputs.CHANGELOG_BODY }}
draft: true
prerelease: true
draft: false
prerelease: false

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
Expand Down
213 changes: 142 additions & 71 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.ton</groupId>
<artifactId>MyLocalTon</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -48,6 +48,13 @@
<win.amd64.ton.binaries.uri>
https://cicd.neodix.io/view/pipelines/job/${ton_branch}-pipeline/lastSuccessfulBuild/artifact/artifacts/ton-x86-64-windows.zip
</win.amd64.ton.binaries.uri>

<linux.arm64.ton.binaries.uri>
https://cicd.neodix.io/view/pipelines/job/${ton_branch}-pipeline/lastSuccessfulBuild/artifact/artifacts/ton-arm64-linux-portable.zip
</linux.arm64.ton.binaries.uri>
<mac.arm64.ton.binaries.uri>
https://cicd.neodix.io/view/pipelines/job/${ton_branch}-pipeline/lastSuccessfulBuild/artifact/artifacts/ton-arm64-macos-portable.zip
</mac.arm64.ton.binaries.uri>
</properties>

<repositories>
Expand Down Expand Up @@ -371,89 +378,153 @@
<pathelement location="${project.basedir}/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<get src="${linux.amd64.ton.binaries.uri}"
dest="${project.build.directory}/binaries-linux-x86_64.zip"
verbose="false"
usetimestamp="true"/>
<if>
<available file="${project.build.directory}/binaries-linux-x86_64"/>
<equals arg1="${arch}" arg2=""/>
<then>
</then>
<else>
<unzip src="${project.build.directory}/binaries-linux-x86_64.zip"
dest="${project.build.directory}/binaries-linux-x86_64"/>
</else>
</if>
<echo>"Building MyLocalTon x86-64 ${ton_branch}"</echo>
<get src="${linux.amd64.ton.binaries.uri}"
dest="${project.build.directory}/binaries-linux-x86_64.zip"
verbose="false"
usetimestamp="true"/>
<if>
<available file="${project.build.directory}/binaries-linux-x86_64"/>
<then>
</then>
<else>
<unzip src="${project.build.directory}/binaries-linux-x86_64.zip"
dest="${project.build.directory}/binaries-linux-x86_64"/>
</else>
</if>

<get src="${mac.amd64.ton.binaries.uri}"
dest="${project.build.directory}/binaries-mac-x86_64.zip"
verbose="false"
usetimestamp="true"/>
<if>
<available file="${project.build.directory}/binaries-mac-x86_64"/>
<then>
</then>
<else>
<unzip src="${project.build.directory}/binaries-mac-x86_64.zip"
dest="${project.build.directory}/binaries-mac-x86_64"/>
</else>
</if>
<get src="${mac.amd64.ton.binaries.uri}"
dest="${project.build.directory}/binaries-mac-x86_64.zip"
verbose="false"
usetimestamp="true"/>
<if>
<available file="${project.build.directory}/binaries-mac-x86_64"/>
<then>
</then>
<else>
<unzip src="${project.build.directory}/binaries-mac-x86_64.zip"
dest="${project.build.directory}/binaries-mac-x86_64"/>
</else>
</if>

<get src="${win.amd64.ton.binaries.uri}"
dest="${project.build.directory}/binaries-windows-x86_64.zip"
verbose="false"
usetimestamp="true"/>
<if>
<available file="${project.build.directory}/binaries-windows-x86_64"/>
<then>
</then>
<else>
<unzip src="${project.build.directory}/binaries-windows-x86_64.zip"
dest="${project.build.directory}/binaries-windows-x86_64"/>
</else>
</if>
<get src="${win.amd64.ton.binaries.uri}"
dest="${project.build.directory}/binaries-windows-x86_64.zip"
verbose="false"
usetimestamp="true"/>
<if>
<available file="${project.build.directory}/binaries-windows-x86_64"/>
<then>
</then>
<else>
<unzip src="${project.build.directory}/binaries-windows-x86_64.zip"
dest="${project.build.directory}/binaries-windows-x86_64"/>
</else>
</if>

<if>
<available
file="${basedir}/src/main/resources/org/ton/binaries/ton-linux-x86_64.zip"/>
<then>
</then>
<else>
<copy file="${project.build.directory}/binaries-linux-x86_64.zip"
tofile="${basedir}/src/main/resources/org/ton/binaries/ton-linux-x86_64.zip"/>
</else>
</if>
<if>
<available
file="${basedir}/src/main/resources/org/ton/binaries/ton-linux-x86_64.zip"/>
<then>
</then>
<else>
<copy file="${project.build.directory}/binaries-linux-x86_64.zip"
tofile="${basedir}/src/main/resources/org/ton/binaries/ton-linux-x86_64.zip"/>
</else>
</if>

<copy file="${project.build.directory}/binaries-linux-x86_64/libtonlibjson.so"
tofile="${basedir}/src/main/resources/tonlibjson.so"/>
<copy file="${project.build.directory}/binaries-linux-x86_64/libtonlibjson.so"
tofile="${basedir}/src/main/resources/tonlibjson.so"/>

<if>
<available
file="${basedir}/src/main/resources/org/ton/binaries/ton-mac-x86_64.zip"/>
<then>
</then>
<else>
<copy file="${project.build.directory}/binaries-mac-x86_64.zip"
tofile="${basedir}/src/main/resources/org/ton/binaries/ton-mac-x86_64.zip"/>
</else>
</if>
<if>
<available
file="${basedir}/src/main/resources/org/ton/binaries/ton-mac-x86_64.zip"/>
<then>
</then>
<else>
<copy file="${project.build.directory}/binaries-mac-x86_64.zip"
tofile="${basedir}/src/main/resources/org/ton/binaries/ton-mac-x86_64.zip"/>
</else>
</if>

<copy file="${project.build.directory}/binaries-mac-x86_64/libtonlibjson.dylib"
tofile="${basedir}/src/main/resources/libtonlibjson.dylib"/>
<copy file="${project.build.directory}/binaries-mac-x86_64/libtonlibjson.dylib"
tofile="${basedir}/src/main/resources/libtonlibjson.dylib"/>

<if>
<available
file="${basedir}/src/main/resources/org/ton/binaries/ton-win-x86_64.zip"/>
<then>
<if>
<available
file="${basedir}/src/main/resources/org/ton/binaries/ton-win-x86_64.zip"/>
<then>
</then>
<else>
<copy file="${project.build.directory}/binaries-windows-x86_64.zip"
tofile="${basedir}/src/main/resources/org/ton/binaries/ton-win-x86_64.zip"/>
</else>
</if>

<copy file="${project.build.directory}/binaries-windows-x86_64/tonlibjson.dll"
tofile="${basedir}/src/main/resources/tonlibjson.dll"/>
</then>
<else>
<copy file="${project.build.directory}/binaries-windows-x86_64.zip"
tofile="${basedir}/src/main/resources/org/ton/binaries/ton-win-x86_64.zip"/>
<echo>"Building MyLocalTon arm64 ${ton_branch}"</echo>
<get src="${linux.arm64.ton.binaries.uri}"
dest="${project.build.directory}/binaries-linux-arm64.zip"
verbose="false"
usetimestamp="true"/>
<if>
<available file="${project.build.directory}/binaries-linux-arm64"/>
<then>
</then>
<else>
<unzip src="${project.build.directory}/binaries-linux-arm64.zip"
dest="${project.build.directory}/binaries-linux-arm64"/>
</else>
</if>

<get src="${mac.arm64.ton.binaries.uri}"
dest="${project.build.directory}/binaries-mac-arm64.zip"
verbose="false"
usetimestamp="true"/>
<if>
<available file="${project.build.directory}/binaries-mac-arm64"/>
<then>
</then>
<else>
<unzip src="${project.build.directory}/binaries-mac-arm64.zip"
dest="${project.build.directory}/binaries-mac-arm64"/>
</else>
</if>

<if>
<available
file="${basedir}/src/main/resources/org/ton/binaries/ton-linux-arm64.zip"/>
<then>
</then>
<else>
<copy file="${project.build.directory}/binaries-linux-arm64.zip"
tofile="${basedir}/src/main/resources/org/ton/binaries/ton-linux-arm64.zip"/>
</else>
</if>

<copy file="${project.build.directory}/binaries-linux-arm64/libtonlibjson.so"
tofile="${basedir}/src/main/resources/tonlibjson.so"/>

<if>
<available
file="${basedir}/src/main/resources/org/ton/binaries/ton-mac-arm64.zip"/>
<then>
</then>
<else>
<copy file="${project.build.directory}/binaries-mac-arm64.zip"
tofile="${basedir}/src/main/resources/org/ton/binaries/ton-mac-arm64.zip"/>
</else>
</if>

<copy file="${project.build.directory}/binaries-mac-arm64/libtonlibjson.dylib"
tofile="${basedir}/src/main/resources/libtonlibjson.dylib"/>
</else>
</if>

<copy file="${project.build.directory}/binaries-windows-x86_64/tonlibjson.dll"
tofile="${basedir}/src/main/resources/tonlibjson.dll"/>
</target>
</configuration>
</execution>
Expand Down

0 comments on commit 93a7108

Please sign in to comment.