2026-02-02 01:25:45 +05:30

73 lines
2.0 KiB
YAML

name: Daily logos-messaging-nim CI
on:
schedule:
- cron: '30 6 * * *'
env:
NPROC: 2
MAKEFLAGS: "-j${NPROC}"
NIMFLAGS: "--parallelBuild:${NPROC} --colors:off -d:chronicles_colors:none"
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-15]
runs-on: ${{ matrix.os }}
timeout-minutes: 45
name: build-${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Nimble
uses: nim-lang/setup-nimble-action@v1
with:
nimble-version: '0.20.1'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Make update
run: make update
- name: Build binaries
run: make V=1 QUICK_AND_DIRTY_COMPILER=1 examples tools
- name: Notify Discord
if: always()
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
STATUS="${{ job.status }}"
OS="${{ matrix.os }}"
REPO="${{ github.repository }}"
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
if [ "$STATUS" = "success" ]; then
COLOR=3066993
TITLE="✅ CI Success"
else
COLOR=15158332
TITLE="❌ CI Failed"
fi
curl -H "Content-Type: application/json" \
-X POST \
-d "{
\"embeds\": [{
\"title\": \"$TITLE\",
\"color\": $COLOR,
\"fields\": [
{\"name\": \"Repository\", \"value\": \"$REPO\", \"inline\": true},
{\"name\": \"OS\", \"value\": \"$OS\", \"inline\": true},
{\"name\": \"Status\", \"value\": \"$STATUS\", \"inline\": true}
],
\"url\": \"$RUN_URL\",
\"footer\": {\"text\": \"Daily logos-messaging-nim CI\"}
}]
}" \
"$DISCORD_WEBHOOK_URL"