Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

rename: Lam |-> Lambda #13

rename: Lam |-> Lambda

rename: Lam |-> Lambda #13

name: nightly
on:
push:
branches: [main, ci]
jobs:
move-tag:
runs-on: ubuntu-latest
steps:
- name: Move ci tag
run: |
mkdir repo
git clone -b "$BRANCH_NAME" "https://github.com/${GITHUB_REPOSITORY}" repo
cd repo
bash .github/workflows/move-tag.sh "nightly-build" "Last commit build by the CI"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
check-aya-version:
uses: aya-prover/aya-dev/.github/workflows/extract-version.yaml@main
publish-snapshot:
needs: [check-aya-version]
runs-on: ubuntu-latest
if: github.repository == 'aya-prover/aya-dev' && needs.check-aya-version.outputs.isSnapshot == 'true'
env:
ossrhUsername: ${{ secrets.OSSRHUSERNAME }}
ossrhPassword: ${{ secrets.OSSRHPASSWORD }}
steps:
- uses: actions/checkout@v3
- name: Setup Java ${{ needs.check-aya-version.outputs.javaVersion }}
uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: ${{ needs.check-aya-version.outputs.javaVersion }}
- name: gradle publish
uses: gradle/gradle-build-action@v2
with:
arguments: publish --info --no-daemon --stacktrace --warning-mode all
nightly-build:
needs: [move-tag, check-aya-version]
runs-on: ${{ matrix.os }}
env:
nativeName: aya-prover_native_${{ matrix.platform }}${{ matrix.binaryExt }}
nativeSha256: aya-prover_native_${{ matrix.platform }}${{ matrix.binaryExt }}.sha256.txt
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: 'linux-x64'
binaryExt: ''
- os: macos-latest
platform: 'macos-x64'
binaryExt: ''
- os: windows-latest
platform: 'windows-x64'
binaryExt: '.exe'
steps:
- uses: actions/checkout@v3
- name: Setup Java ${{ needs.check-aya-version.outputs.javaVersion }}
uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: ${{ needs.check-aya-version.outputs.javaVersion }}
- name: Run task jlinkAyaZip
uses: gradle/gradle-build-action@v2
with:
arguments: jlinkAyaZip --info --no-daemon --stacktrace --warning-mode all
if: matrix.os == 'ubuntu-latest'
- name: Run task fatJar
uses: gradle/gradle-build-action@v2
with:
arguments: fatJar --no-daemon --stacktrace --warning-mode all
if: matrix.os == 'ubuntu-latest'
- name: Setup GraalVM for Java ${{ needs.check-aya-version.outputs.javaVersion }}
uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ needs.check-aya-version.outputs.javaVersion }}
distribution: 'graalvm-community'
components: 'native-image'
set-java-home: 'true'
cache: 'gradle'
github-token: ${{ secrets.GH_TOKEN }}
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
if: matrix.os == 'windows-latest'
- name: Tell gradle where's my JDK
run: |
# Gradle should respect these environmental variables by default!
echo 'org.gradle.java.installations.fromEnv=JAVA_HOME,GRAALVM_HOME' >> gradle.properties
- name: Gradle, do you understand?
uses: gradle/gradle-build-action@v2
with:
arguments: javaToolchains --no-daemon --stacktrace --warning-mode all
- name: Run task nativeCompile
uses: gradle/gradle-build-action@v2
with:
arguments: nativeCompile --no-daemon --stacktrace --warning-mode all
- name: Copy aya Native Image
run: cp ./cli-console/build/native/nativeCompile/aya${{ matrix.binaryExt }} ./${{ env.nativeName }}
- name: Checksum (Native, Unix)
run: shasum -a 256 ./${{ env.nativeName }} > ./${{ env.nativeSha256 }}
if: matrix.os != 'windows-latest'
- name: Checksum (Native, Windows)
run: Get-FileHash ./${{ env.nativeName }} -Algorithm SHA256 > ./${{ env.nativeSha256 }}
if: matrix.os == 'windows-latest'
- name: Test native image
run: ./${{ env.nativeName }} --remake base/src/test/resources/success
- name: Update Release (Native images)
uses: Xotl/cool-github-releases@v1
if: matrix.os != 'ubuntu-latest'
with:
mode: update
isPrerelease: false
tag_name: nightly-build
release_name: "Nightly builds"
body_mrkdwn: |
_These are latest builds, but the date on GitHub is frozen due to stupid limitations.
Corresponding commit: <https://github.com/aya-prover/aya-dev/commit/${{ github.sha }}>_
assets: ${{ env.nativeSha256 }};${{ env.nativeName }}|application/octet-stream
replace_assets: true
github_token: ${{ secrets.GH_TOKEN }}
- name: Collect jlink zip files
if: matrix.os == 'ubuntu-latest'
id: collect_jlinkAyaZip
run: |
jlinkFiles="$(find ide-lsp/build/image -maxdepth 1 -type f -exec echo -n '{};' \;)"
echo "Found jlinkAyaZip outputs: $jlinkFiles"
echo "::set-output name=jlinkFiles::$jlinkFiles"
- name: Copy fat jar
if: matrix.os == 'ubuntu-latest'
run: |
cp ./ide-lsp/build/libs/*-fat.jar ./lsp-fatjar.jar
cp ./cli-console/build/libs/*-fat.jar ./cli-fatjar.jar
- name: Update Release (jlink zips and jars)
uses: Xotl/cool-github-releases@v1
if: matrix.os == 'ubuntu-latest'
with:
mode: update
isPrerelease: false
tag_name: nightly-build
release_name: "Nightly builds"
body_mrkdwn: |
_These are latest builds, but the date on GitHub is frozen due to stupid limitations.
Corresponding commit: <https://github.com/aya-prover/aya-dev/commit/${{ github.sha }}>_
assets: ${{ env.nativeSha256 }};${{ env.nativeName }}|application/octet-stream;lsp-fatjar.jar;cli-fatjar.jar;${{ steps.collect_jlinkAyaZip.outputs.jlinkFiles }}
replace_assets: true
github_token: ${{ secrets.GH_TOKEN }}