Skip to content

Deprecate Intel precompilation, fix versioning #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions src/jobs/precompile_for_macos_intel.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
description: >
Precompile a package for macOS with Intel architecture
CircleCI has deprecated support for all Intel-based macOS resources, this job will do nothing.

macos:
xcode: 14.0.1
resource_class: macos.x86.medium.gen2
docker:
- image: ubuntu

parameters:
package-name:
Expand All @@ -17,13 +16,5 @@ parameters:
steps:
- checkout
- run:
name: Precompile package
command: << include(scripts/precompile_for_macos.sh) >>
environment:
PACKAGE_NAME: << parameters.package-name >>
EXPECTED_VERSION: << parameters.expected-version >>
ARCHITECTURE: intel
- persist_to_workspace:
root: ~/project/
paths:
- workspace/<< parameters.package-name >>_macos_intel
name: Skip precompilation
command: echo 'Intel-based macOS resources deprecated, skipping'
5 changes: 2 additions & 3 deletions src/scripts/precompile_for_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
caskroom=$(brew --caskroom)
rm -rf "${caskroom:?}"/*
# get the latest version of the package and check if it matches the version provided in the tag
real_version="v$(brew info $PACKAGE_NAME | tail -n +1 | head -1 | cut -d ' ' -f 4)"
real_version="v$(brew info $PACKAGE_NAME | tail -n +1 | awk 'BEGIN {FS="[ ,]";} NR==1 {print $4}')"
if [[ ! $EXPECTED_VERSION =~ ^($real_version|"no check")$ ]]; then
echo "Version passed via tag: $EXPECTED_VERSION not matching installed version: $real_version"
echo "Version passed via tag: $EXPECTED_VERSION not matching version to be installed: $real_version"
exit 1
fi
# uninstall all packages that are already installed, since only the installed package
Expand All @@ -38,4 +38,3 @@ cd "$(brew --prefix)"/lib || exit 1
for f in "$(brew --prefix)"/Cellar/*/*/lib/lib*.so*; do
cp -a $f ~/project/workspace/$artifact_name/lib
done

4 changes: 2 additions & 2 deletions src/scripts/precompile_for_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ mkdir -p ~/project/workspace/$artifact_name/lib
caskroom=$(brew --caskroom)
rm -rf "${caskroom:?}"/*
# get the latest version of the package and check if it matches the version provided in the tag
real_version="v$(brew info $PACKAGE_NAME | tail -n +1 | head -1 | cut -d ' ' -f 4)"
real_version="v$(brew info $PACKAGE_NAME | tail -n +1 | awk 'BEGIN {FS="[ ,]";} NR==1 {print $4}')"
if [[ ! $EXPECTED_VERSION =~ ^($real_version|"no check")$ ]]; then
echo "Version passed via tag: $EXPECTED_VERSION not matching installed version: $real_version"
echo "Version passed via tag: $EXPECTED_VERSION not matching version to be installed: $real_version"
exit 1
fi
# uninstall all packages that are already installed, since only the installed package
Expand Down