Skip to content

Commit

Permalink
17697: Removes no postfix binaries (#17)
Browse files Browse the repository at this point in the history
Binary artifacts without a postfix (copies of default target binary on
each platform) are being removed. This functionality was intended to
help flipping between variant builds but the right way is to use
symlinking in user space, not whole copies of binaries in the deployed
artifacts.
  • Loading branch information
calebwherry authored Sep 29, 2023
1 parent a960b63 commit a76d579
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 75 deletions.
70 changes: 46 additions & 24 deletions .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
build-linux:
runs-on: ubuntu-20.04
container:
image: ghcr.io/howsoai/amalgam-build-container-linux:0.13.0
image: ghcr.io/howsoai/amalgam-build-container-linux:1.0.0
credentials:
username: ${{ github.actor }}
password: ${{ github.token }}
Expand Down Expand Up @@ -193,12 +193,10 @@ jobs:
- name: Smoke test
run: |
set -e
BIN=./amalgam/bin
echo -n "amalgam: " && $BIN/amalgam --version
echo -n "amalgam-mt: " && $BIN/amalgam-mt --version
echo -n "amalgam-mt-noavx: " && $BIN/amalgam-mt-noavx --version
echo -n "amalgam-st: " && $BIN/amalgam-st --version
echo -n "amalgam-omp: " && $BIN/amalgam-omp --version
cd ./amalgam/bin
for f in *; do
echo -n "$f: " && "./$f" --version
done
smoke-test-linux-arm64:
needs: ['build-linux']
Expand All @@ -222,11 +220,10 @@ jobs:
commands: |
set -e
PATH=$PATH:/usr/aarch64-linux-gnu
BIN=./amalgam/bin
echo -n "amalgam: " && $BIN/amalgam --version
echo -n "amalgam-mt: " && $BIN/amalgam-mt --version
echo -n "amalgam-st: " && $BIN/amalgam-st --version
echo -n "amalgam-omp: " && $BIN/amalgam-omp --version
cd ./amalgam/bin
for f in *; do
echo -n "$f: " && "./$f" --version
done
smoke-test-linux-arm64_8a:
needs: ['build-linux']
Expand All @@ -250,9 +247,10 @@ jobs:
commands: |
set -e
PATH=$PATH:/usr/aarch64-linux-gnu
BIN=./amalgam/bin
echo -n "amalgam: " && $BIN/amalgam --version
echo -n "amalgam-st: " && $BIN/amalgam-st --version
cd ./amalgam/bin
for f in *; do
echo -n "$f: " && "./$f" --version
done
smoke-test-macos-amd64:
needs: ['build-macos']
Expand All @@ -268,12 +266,38 @@ jobs:
mkdir ./amalgam
tar -xvf ./amalgam-${{ inputs.version }}-darwin-amd64.tar.gz -C ./amalgam
# GitHub macos runner does not support AVX
# GitHub macOS runner does not support AVX
- name: Smoke test
run: |
set -e
BIN=./amalgam/bin
echo -n "amalgam-mt-noavx: " && $BIN/amalgam-mt-noavx --version
cd ./amalgam/bin
for f in *noavx*; do
echo -n "$f: " && "./$f" --version
done
# Turned off until GitHub runners support arm64 macOS
smoke-test-macos-arm64:
if: false
needs: ['build-macos']
runs-on: macos-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: amalgam-${{ inputs.version }}-darwin-amd64

- name: Extract Amalgam
run: |
mkdir ./amalgam
tar -xvf ./amalgam-${{ inputs.version }}-darwin-arm64.tar.gz -C ./amalgam
- name: Smoke test
run: |
set -e
cd ./amalgam/bin
for f in *; do
echo -n "$f: " && "./$f" --version
done
smoke-test-windows-amd64:
needs: ['build-windows']
Expand All @@ -292,9 +316,7 @@ jobs:
- name: Smoke test
run: |
set -e
BIN=./amalgam/bin
echo -n "amalgam: " && $BIN/amalgam --version
echo -n "amalgam-mt: " && $BIN/amalgam-mt --version
echo -n "amalgam-mt-noavx: " && $BIN/amalgam-mt-noavx --version
echo -n "amalgam-st: " && $BIN/amalgam-st --version
echo -n "amalgam-omp: " && $BIN/amalgam-omp --version
cd ./amalgam/bin
for f in *; do
echo -n "$f: " && "./$f" --version
done
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ endif()
# Additional artifacts/test/etc
#

include(create_no_suffix_artifacts)
include(create_tests)
include(create_package)
include(create_static_targets)
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Pre-built binaries are provided for specific target systems. They are as statica

An interpreter application and shared library (dll/so/dylib) are built for each release. A versioned tarball is created for each target platform in the build matrix:

| Platform | Variants <sup>1,2</sup> | Automated Testing | Notes |
| Platform | Variants <sup>1</sup> | Automated Testing | Notes |
|------------------------------|-------------------------------|:------------------:|-------|
| Windows amd64 | MT, ST, OMP, MT-NoAVX | :heavy_check_mark: | |
| Linux amd64 | MT, ST, OMP, MT-NoAVX, ST-PGC | :heavy_check_mark: | ST-PGC is for testing only, not packaged for release |
Expand Down Expand Up @@ -107,8 +107,6 @@ An interpreter application and shared library (dll/so/dylib) are built for each
* Binary postfix: '-st-pgc'
* Interpreter does not use any threads and performs garbage collection at every operation
* Very slow by nature, intended only be used for verification during testing or debugging
* <sup>2</sup> Most platforms create a bare binary with no postfix
* These are just clones of their respective MT binary and can be used for better symlinking, cleaner library linking, and simpler CLI usage.

#### Build Tools

Expand Down
46 changes: 0 additions & 46 deletions build/cmake/create_no_suffix_artifacts.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion build/cmake/create_static_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

# Build files:
file(GLOB_RECURSE CONFIG_FILES "build/*")
file(GLOB_RECURSE CONFIG_FILES ".github/*" "build/*")
list(APPEND CONFIG_FILES
.gitignore
CMakeLists.txt
Expand Down

0 comments on commit a76d579

Please sign in to comment.