Skip to content

Commit c05274d

Browse files
authored
Merge branch 'develop' into _update-deps/runtimeverification/haskell-backend
2 parents f460638 + 021111c commit c05274d

8 files changed

Lines changed: 2 additions & 357 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 199 deletions
Original file line numberDiff line numberDiff line change
@@ -309,205 +309,6 @@ jobs:
309309
path: |
310310
**/kore-exec.tar.gz
311311
312-
macos-build:
313-
name: 'Build MacOS Package'
314-
runs-on: macos-latest
315-
timeout-minutes: 120
316-
environment: production
317-
needs: [set-release-id, source-tarball]
318-
continue-on-error: true # Do not fail releases due to MacOS builds at this time. Oct. 6, 2025
319-
steps:
320-
- name: Check out code
321-
uses: actions/checkout@v4
322-
with:
323-
submodules: recursive
324-
path: kframework
325-
326-
- name: Check out matching homebrew repo branch
327-
uses: actions/checkout@v4
328-
id: checkout
329-
with:
330-
repository: runtimeverification/homebrew-k
331-
path: homebrew-k
332-
ref: staging
333-
continue-on-error: true
334-
335-
- name: Check out homebrew repo master branch
336-
uses: actions/checkout@v4
337-
if: ${{ steps.checkout.outcome == 'failure' }}
338-
with:
339-
repository: runtimeverification/homebrew-k
340-
path: homebrew-k
341-
342-
- name: Cache maven
343-
uses: actions/cache@v4
344-
with:
345-
path: ~/.m2/repository
346-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-
347-
restore-keys: |
348-
${{ runner.os }}-maven-
349-
350-
- name: Mac Dependencies
351-
run: |
352-
# Via: https://github.com/ledger/ledger/commit/1eec9f86667cad3b0bbafb82a83739a0d30ca09f
353-
# Unlink and re-link to prevent errors when github mac runner images
354-
# install python outside of brew, for example:
355-
# https://github.com/orgs/Homebrew/discussions/3895
356-
# https://github.com/actions/setup-python/issues/577
357-
# https://github.com/actions/runner-images/issues/6459
358-
# https://github.com/actions/runner-images/issues/6507
359-
# https://github.com/actions/runner-images/issues/2322
360-
361-
# shellcheck disable=SC2162
362-
brew list -1 | grep python | while read formula; do brew unlink "$formula"; brew link --overwrite "$formula"; done
363-
364-
# uninstall pre-installed cmake
365-
brew uninstall cmake
366-
367-
- name: Build brew bottle
368-
id: build
369-
env:
370-
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
371-
MAVEN_OPTS: >-
372-
-Dhttp.keepAlive=false
373-
-Dmaven.wagon.http.pool=false
374-
-Dmaven.wagon.httpconnectionManager.ttlSeconds=30
375-
run: |
376-
PACKAGE=kframework
377-
VERSION=$(cat kframework/package/version)
378-
ROOT_URL='https://github.com/runtimeverification/k/releases/download'
379-
wget "$ROOT_URL/v${VERSION}/kframework-${VERSION}-src.tar.gz"
380-
cd homebrew-k
381-
../kframework/package/macos/brew-update-to-local "${PACKAGE}" "${VERSION}"
382-
git commit "Formula/$PACKAGE.rb" -m "Update ${PACKAGE} to ${VERSION}: part 1"
383-
../kframework/package/macos/brew-build-and-update-to-local-bottle "${PACKAGE}" "${VERSION}" "${ROOT_URL}"
384-
git reset HEAD^
385-
LOCAL_BOTTLE_NAME=$(basename "$(find . -name "kframework--${VERSION}.arm64_sonoma.bottle*.tar.gz")")
386-
# shellcheck disable=2001
387-
BOTTLE_NAME=$(echo "${LOCAL_BOTTLE_NAME#./}" | sed 's!kframework--!kframework-!')
388-
../kframework/package/macos/brew-update-to-final "${PACKAGE}" "${VERSION}" "${ROOT_URL}"
389-
echo "path=${LOCAL_BOTTLE_NAME}" >> "${GITHUB_OUTPUT}"
390-
echo "path_remote=${BOTTLE_NAME}" >> "${GITHUB_OUTPUT}"
391-
392-
- name: Upload bottle
393-
uses: actions/upload-artifact@v4
394-
with:
395-
name: homebrew
396-
path: homebrew-k
397-
398-
outputs:
399-
bottle_path: ${{ steps.build.outputs.path }}
400-
bottle_path_remote: ${{ steps.build.outputs.path_remote }}
401-
402-
macos-test:
403-
name: 'Test MacOS Package'
404-
runs-on: macos-latest
405-
timeout-minutes: 60
406-
environment: production
407-
needs: [macos-build, set-release-id]
408-
continue-on-error: true # Do not fail releases due to MacOS tests at this time. Oct. 6, 2025
409-
steps:
410-
- name: 'Check out matching homebrew repo branch'
411-
uses: actions/checkout@v4
412-
id: checkout
413-
with:
414-
repository: runtimeverification/homebrew-k
415-
token: ${{ secrets.JENKINS_GITHUB_PAT }}
416-
path: homebrew-k
417-
ref: staging
418-
continue-on-error: true
419-
420-
- name: 'Check out homebrew repo master branch'
421-
uses: actions/checkout@v4
422-
if: ${{ steps.checkout.outcome == 'failure' }}
423-
with:
424-
repository: runtimeverification/homebrew-k
425-
token: ${{ secrets.JENKINS_GITHUB_PAT }}
426-
path: homebrew-k
427-
428-
- name: 'Download bottle'
429-
uses: actions/download-artifact@v4
430-
with:
431-
name: homebrew
432-
path: homebrew-k-old
433-
434-
- name: Mac Dependencies
435-
run: |
436-
# Via: https://github.com/ledger/ledger/commit/1eec9f86667cad3b0bbafb82a83739a0d30ca09f
437-
# Unlink and re-link to prevent errors when github mac runner images
438-
# install python outside of brew, for example:
439-
# https://github.com/orgs/Homebrew/discussions/3895
440-
# https://github.com/actions/setup-python/issues/577
441-
# https://github.com/actions/runner-images/issues/6459
442-
# https://github.com/actions/runner-images/issues/6507
443-
# https://github.com/actions/runner-images/issues/2322
444-
445-
# shellcheck disable=SC2162
446-
brew list -1 | grep python | while read formula; do brew unlink "$formula"; brew link --overwrite "$formula"; done
447-
448-
- name: 'Test brew bottle'
449-
id: test
450-
env:
451-
# github actions sets the JAVA_HOME variable to Java 8 explicitly for
452-
# some reason. There doesn't seem to be a way to tell it to unset the
453-
# variable, so instead we just have to tell it to use Java 17
454-
# explicitly instead.
455-
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}
456-
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
457-
run: |
458-
# The macOS public runners are prone to flakiness when running this
459-
# test suite, so the PL-tutorial is disabled for now.
460-
# - https://github.com/runtimeverification/k/issues/3705
461-
cd homebrew-k-old
462-
# brew tap expects a git repository, so we initialise the current folder as a dummy repo
463-
git init
464-
brew tap runtimeverification/k "file:///$(pwd)"
465-
# Install the formula using the local bottle file
466-
# First, check what files are available
467-
ls -la
468-
# Try to install using the bottle file pattern like the original script
469-
brew install kframework--*.bottle*.tar.gz -v
470-
# cp -R /usr/local/share/kframework/pl-tutorial ~
471-
# WD=`pwd`
472-
# cd
473-
# echo 'Starting kserver...'
474-
# spawn-kserver $WD/kserver.log
475-
# cd pl-tutorial
476-
# echo 'Testing tutorial in user environment...'
477-
# make -j`sysctl -n hw.ncpu` ${MAKE_EXTRA_ARGS}
478-
# cd ~
479-
echo 'module TEST imports BOOL endmodule' > test.k
480-
kompile test.k --backend llvm
481-
kompile test.k --backend haskell
482-
483-
- name: 'Check out code'
484-
uses: actions/checkout@v4
485-
with:
486-
path: k-homebrew-checkout
487-
token: ${{ secrets.JENKINS_GITHUB_PAT }}
488-
489-
- name: 'Upload Package to Release'
490-
env:
491-
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
492-
BOTTLE_NAME: ${{ needs.macos-build.outputs.bottle_path }}
493-
REMOTE_BOTTLE_NAME: ${{ needs.macos-build.outputs.bottle_path_remote }}
494-
run: |
495-
set -x
496-
version=$(cat k-homebrew-checkout/package/version)
497-
mv "homebrew-k-old/${BOTTLE_NAME}" "homebrew-k-old/${REMOTE_BOTTLE_NAME}"
498-
gh release upload --repo runtimeverification/k --clobber "v${version}" "homebrew-k-old/${REMOTE_BOTTLE_NAME}"
499-
500-
- run: |
501-
git config --global user.name rv-jenkins
502-
git config --global user.email devops@runtimeverification.com
503-
504-
- name: 'Commit changes'
505-
run: |
506-
cp homebrew-k-old/Formula/kframework.rb homebrew-k/Formula/kframework.rb
507-
cd homebrew-k
508-
git commit -m 'Update brew package version' Formula/kframework.rb
509-
git push origin master
510-
511312
release:
512313
name: 'Publish Release'
513314
runs-on: [self-hosted, linux, normal]

.github/workflows/test-pr.yml

Lines changed: 0 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -337,128 +337,4 @@ jobs:
337337
docker stop --time=0 k-pyk-regression-${{ github.sha }}
338338
339339
340-
test-macos-build:
341-
name: 'K: macOS Build & Test'
342-
runs-on: macos-15
343-
timeout-minutes: 60
344-
needs: code-quality
345-
continue-on-error: true # Do not fail PRs due to MacOS builds at this time. Oct. 6, 2025
346-
steps:
347-
- name: 'Set up Java 17'
348-
uses: actions/setup-java@v4
349-
with:
350-
distribution: 'zulu'
351-
java-version: 17
352-
353-
- name: 'Check out code'
354-
uses: actions/checkout@v4
355-
with:
356-
submodules: recursive
357-
path: kframework
358-
359-
- name: 'Check out homebrew repo'
360-
uses: actions/checkout@v4
361-
with:
362-
repository: runtimeverification/homebrew-k
363-
path: homebrew-k
364-
ref: master
365-
366-
- name: 'Mac Dependencies'
367-
run: |
368-
# Via: https://github.com/ledger/ledger/commit/1eec9f86667cad3b0bbafb82a83739a0d30ca09f
369-
# Unlink and re-link to prevent errors when github mac runner images
370-
# install python outside of brew, for example:
371-
# https://github.com/orgs/Homebrew/discussions/3895
372-
# https://github.com/actions/setup-python/issues/577
373-
# https://github.com/actions/runner-images/issues/6459
374-
# https://github.com/actions/runner-images/issues/6507
375-
# https://github.com/actions/runner-images/issues/2322
376-
377-
# shellcheck disable=SC2162
378-
brew list -1 | grep python | while read formula; do brew unlink "$formula"; brew link --overwrite "$formula"; done
379-
380-
# uninstall pre-installed cmake
381-
brew uninstall cmake
382-
383-
- name: 'Build brew bottle'
384-
id: build
385-
env:
386-
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
387-
MAVEN_OPTS: >-
388-
-Dhttp.keepAlive=false
389-
-Dmaven.wagon.http.pool=false
390-
-Dmaven.wagon.httpconnectionManager.ttlSeconds=30
391-
run: |
392-
PACKAGE=kframework
393-
VERSION=$(cat kframework/package/version)
394-
ROOT_URL='https://github.com/runtimeverification/k/releases/download'
395-
396-
# For PR testing, we'll use the latest available source tarball
397-
# or create a test tarball from the current code
398-
if [ -f "$ROOT_URL/v${VERSION}/kframework-${VERSION}-src.tar.gz" ]; then
399-
wget "$ROOT_URL/v${VERSION}/kframework-${VERSION}-src.tar.gz"
400-
else
401-
# Create a test tarball from current code for PR testing
402-
echo "Creating test tarball for PR testing..."
403-
tar czf "kframework-${VERSION}-src.tar.gz" --exclude='.git' --exclude='homebrew-k' .
404-
fi
405-
406-
cd homebrew-k
407-
../kframework/package/macos/brew-update-to-local "${PACKAGE}" "${VERSION}"
408-
git commit "Formula/$PACKAGE.rb" -m "Update ${PACKAGE} to ${VERSION}: part 1"
409-
../kframework/package/macos/brew-build-and-update-to-local-bottle "${PACKAGE}" "${VERSION}" "${ROOT_URL}"
410-
git reset HEAD^
411-
LOCAL_BOTTLE_NAME=$(basename "$(find . -name "kframework--${VERSION}.arm64_sonoma.bottle*.tar.gz")")
412-
# shellcheck disable=2001
413-
BOTTLE_NAME=$(echo "${LOCAL_BOTTLE_NAME#./}" | sed 's!kframework--!kframework-!')
414-
../kframework/package/macos/brew-update-to-final "${PACKAGE}" "${VERSION}" "${ROOT_URL}"
415-
echo "path=${LOCAL_BOTTLE_NAME}" >> "${GITHUB_OUTPUT}"
416-
echo "path_remote=${BOTTLE_NAME}" >> "${GITHUB_OUTPUT}"
417-
418-
- name: 'Upload bottle'
419-
uses: actions/upload-artifact@v4
420-
with:
421-
name: homebrew-bottle
422-
path: homebrew-k
423-
retention-days: 1
424-
425-
- name: 'Test Homebrew formula validation'
426-
id: test
427-
env:
428-
# github actions sets the JAVA_HOME variable to Java 8 explicitly for
429-
# some reason. There doesn't seem to be a way to tell it to unset the
430-
# variable, so instead we just have to tell it to use Java 17
431-
# explicitly instead.
432-
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}
433-
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
434-
MAVEN_OPTS: >-
435-
-Dhttp.keepAlive=false
436-
-Dmaven.wagon.http.pool=false
437-
-Dmaven.wagon.httpconnectionManager.ttlSeconds=30
438-
run: |
439-
# Test the Homebrew formula validation and basic functionality
440-
cd homebrew-k
441-
442-
# Remove any existing tap to avoid remote mismatch errors
443-
brew untap runtimeverification/k 2>/dev/null || true
444-
445-
# Validate the formula syntax by installing it as a local tap
446-
brew tap runtimeverification/k "file://$(pwd)"
447-
448-
# Test formula installation from source
449-
brew install --build-from-source kframework -v
450-
451-
# Basic functionality test
452-
echo 'module TEST imports BOOL endmodule' > test.k
453-
kompile test.k --backend llvm
454-
kompile test.k --backend haskell
455-
echo "✅ macOS build and test completed successfully"
456-
457-
- name: 'Upload formula for debugging'
458-
if: always()
459-
uses: actions/upload-artifact@v4
460-
with:
461-
name: macos-formula-test
462-
path: homebrew-k/Formula/kframework.rb
463-
retention-days: 1
464340

CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
/k-distribution/include/kframework/builtin/* @palinatolmach @tothtamas28
1+
/k-distribution/include/kframework/builtin/* @palinatolmach @tothtamas28 @ehildenb
22
/.github/workflows/* @runtimeverification/admin
3-
/package/version @palinatolmach @rv-jenkins @F-WRunTime @tothtamas28
3+
/package/version @palinatolmach @rv-jenkins @tothtamas28

package/macos/brew-build-and-update-to-local-bottle

Lines changed: 0 additions & 11 deletions
This file was deleted.

package/macos/brew-install-bottle

Lines changed: 0 additions & 5 deletions
This file was deleted.

package/macos/brew-install-deps

Lines changed: 0 additions & 4 deletions
This file was deleted.

package/macos/brew-update-to-final

Lines changed: 0 additions & 6 deletions
This file was deleted.

package/macos/brew-update-to-local

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)