forked from fricas/fricas
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 1.47 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: FriCAS CI on Linux
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: sudo apt-get install sbcl libgmp-dev libxpm-dev
- name: configure
run: ./configure --with-lisp=sbcl --with-gmp --with-x || cat config.log
- name: make
run: make -j2 --output-sync
- name: make check
run: make check -j2 --output-sync
- name: Create artifact archives
run: tar -cjf FriCAS-linux-x86_64-${{ github.sha }}.tbz2 target/
- name: Upload Linux binary
uses: actions/upload-artifact@v3
with:
name: FriCAS-linux-x86_64-binary
path: FriCAS-linux-x86_64-${{ github.sha }}.tbz2
- name: Upload to nightly release
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' && github.repository == 'fricas/fricas' }}
run: |
export OWNER_REPO=fricas/fricas-nightly-builds
export RELEASE_ID=74905307 ## `curl https://api.github.com/repos/${OWNER_REPO}/releases/tags/nightly | jq .id`
curl -v -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.releasetoken }}" "https://uploads.github.com/repos/${OWNER_REPO}/releases/${RELEASE_ID}/assets?name=FriCAS-$(date +%Y-%m-%dT%H.%M)-linux-x86_64-$(echo ${{ github.sha }} | cut -c 1-8).tbz2" --data-binary "@FriCAS-linux-x86_64-${{ github.sha }}.tbz2" -H "Content-Type: application/x-bzip2" || true