Skip to content

Commit

Permalink
Trac #33263: Add github action running on each push
Browse files Browse the repository at this point in the history
Add a github action that runs on each push. Since it uses the most
recent docker image as the base, the runtime is relatively short with
about 2h. The idea is to get quick feedback on PRs without the need to
wait until the patchbot picks it up. After this ticket is merged, we can
add a badge in the ticket similar to the linter workflow.

Example run: https://github.com/sagemath/sagetrac-
mirror/actions/workflows/build.yml
(it works but one doctest and the pytests are failing; I think there are
already tickets for these issues)

URL: https://trac.sagemath.org/33263
Reported by: gh-tobiasdiez
Ticket author(s): Tobias Diez
Reviewer(s): Matthias Koeppe
  • Loading branch information
Release Manager committed Feb 14, 2022
2 parents 959ff7a + 6329816 commit 5bdf5dd
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build & Test

on:
push:
workflow_dispatch:
# Allow to run manually

concurrency:
# Cancel previous runs of this workflow for the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/sagemath/sage/sage-docker-ubuntu-focal-standard-with-targets:dev
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Prepare
run: |
# Reuse built SAGE_LOCAL contained in the Docker image
./bootstrap
./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv
- name: Build
run: make build
env:
MAKE: make -j2
SAGE_NUM_THREADS: 2

- name: Test
run: ./sage -t --all -p0

0 comments on commit 5bdf5dd

Please sign in to comment.