Skip to content

Commit

Permalink
REFACTOR: Point to latest stable Madgascar release
Browse files Browse the repository at this point in the history
  • Loading branch information
tmasthay committed Jun 16, 2024
1 parent 23a61b2 commit 82f8cc4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/julia/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version = v"1.0.0"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/ahay/src.git", "635f797644c2208e445e488bf32bb39ab65f9627")
GitSource("https://github.com/ahay/src.git", "313ba38ba9cac2930bd485d6e8d8f45da38a1092")
]

# Bash recipe for building across all platforms
Expand Down
9 changes: 7 additions & 2 deletions api/julia/ubuntu_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ UBUNTU_VERSION=$(lsb_release -r | awk '{print $2}')

# Get the git hash
GIT_URL="https://github.com/ahay/src.git"
GIT_HASH=$(git ls-remote $GIT_URL HEAD | awk '{print $1}')
GIT_HASH=$(git ls-remote https://github.com/ahay/src.git | grep "madagascar-[0-9][0-9]*[.].*" | tail -n 1 | awk '{print $1}')


# script runs from src/api/julia, so cd ../.. = cd src
cd ../..

PREFIX=$(pwd)/__PRECOMPILED_BUILD_UBUNTU_${UBUNTU_VERSION}__${GIT_HASH}__
Expand All @@ -29,4 +31,7 @@ NUM_CPUS=$(lscpu | grep "^CPU(s):" | grep -v "NUMA" | awk '{print $2}')
make -j$NUM_CPUS

# Install
make install
make install

cd api/julia
julia update_tarball_script.jl
10 changes: 8 additions & 2 deletions api/julia/update_tarball_script.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ function main(output_file::String; lib_unsupported::AbstractArray{String}=[], bi
final_build_string = "[\n $lib_code,\n $bin_code\n]"

url = "https://github.com/ahay/src.git"
latest_remote_hash = read(`git ls-remote $url HEAD`, String)
latest_remote_hash = split(latest_remote_hash)[1]
command = pipeline(
`git ls-remote https://github.com/ahay/src.git`,
`grep "madagascar-[0-9][0-9]*[.].*"`,
`tail -n 1`,
`awk '{print $1}'`
)

latest_remote_hash = strip(read(command, String))

curr_dir = dirname(@__FILE__)
base_file_contents = read("$curr_dir/tarball_base.jl", String)
Expand Down

0 comments on commit 82f8cc4

Please sign in to comment.