Build on Nightly #373
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Borrowed from https://github.com/mlutze/flix-json/blob/0c214fc693a86e84a5e0c86cb18acab4d6472685/.github/workflows/build-nightly.yaml | |
name: Build on Nightly | |
on: | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build-nightly: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v2.5.0 | |
with: | |
java-version: 17 | |
distribution: zulu | |
- run: | | |
# download today's or yesterday's Flix JAR | |
today=$(date -d today +%Y-%m-%d) | |
yesterday=$(date -d yesterday +%Y-%m-%d) | |
today_url="https://flix.dev/nightly/flix-${today}.jar" | |
yesterday_url="https://flix.dev/nightly/flix-${yesterday}.jar" | |
curl -L -f "${today_url}" > flix.jar || curl -L -f "${yesterday_url}" > flix.jar | |
# run tests | |
java -jar flix.jar test |