From 1e28d32df10bffdfc8f1fc33473dcac336e5ab28 Mon Sep 17 00:00:00 2001 From: Christian Menard Date: Thu, 22 Jun 2023 09:16:00 +0200 Subject: [PATCH] separate build and nightly build workflows --- .github/workflows/build.yml | 7 ------ .github/workflows/nightly-build.yml | 34 ++++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c708806193..f156cba902 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,17 +3,10 @@ name: Build toolchain on: workflow_call: inputs: - nightly: - required: false - type: boolean - default: false all-platforms: required: false default: false type: boolean - secrets: - envPAT: - required: false workflow_dispatch: jobs: diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 9ffb82c581..44232bd948 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -7,9 +7,31 @@ on: workflow_dispatch: jobs: - build: - uses: ./.github/workflows/build.yml - with: - nightly: true - secrets: - envPAT: ${{ secrets.NIGHTLY_BUILD }} + nightly-build: + runs-on: ubuntu-latest + steps: + - name: Check out lingua-franca repository + uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - name: Prepare build environment + uses: ./.github/actions/prepare-build-env + - name: Build and package lf cli tools (nightly build) + shell: bash + run: | + export TIMESTAMP="$(date +'%Y%m%d%H%M%S')" + ./gradlew build -Pnightly=$TIMESTAMP -PtargetOS=Linux -PtargetArch=x86_64 + ./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=Linux -PtargetArch=aarch64 + ./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=MacOS -PtargetArch=x86_64 + ./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=MacOS -PtargetArch=aarch64 + ./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=Windows -PtargetArch=x86_64 + - name: Deploy nightly release + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.NIGHTLY_BUILD }}" + automatic_release_tag: 'nightly' + prerelease: true + title: "Lingua Franca Nightly" + files: | + build/distributions/*