Skip to content

Commit

Permalink
github: Add ubuntu workflow
Browse files Browse the repository at this point in the history
This is a basic workflow to run some of the tests on
Ubuntu in the GitHub CI. It's based on the existing
SourceHut debian workflow.
  • Loading branch information
amcn committed Apr 1, 2024
1 parent a65caf8 commit 38abb00
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# SPDX-FileCopyrightText: Stone Tickle <[email protected]>
# SPDX-License-Identifier: GPL-3.0-only

name: ubuntu

on:
push:
branches: [ github_workflow_ubuntu ]
pull_request:
branches: [ github_workflow_ubuntu ]
types: [opened, synchronize, reopened]

jobs:
ubuntu:
runs-on: ubuntu-latest
env:
DEBIAN_FRONTEND: noninteractive
steps:
# Checkout muon source and install dependencies.
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt update
sudo apt install gcc
# Bootstrap basic build.
- name: Bootstrap
run: |
./bootstrap.sh build
PATH="build:$PATH" build/muon -v setup build
build/muon -C build samu
# Build muon with ASan and UBSan and run the testsuite.
- name: build_asan_ubsan
run: |
build/muon setup -Db_sanitize=address,undefined build_asan_ubsan
build/muon -C build_asan_ubsan samu
- name: test_asan_ubsan
run: |
cd build_asan_ubsan
./muon test -d dots
# Build muon FORTIFY_SOURCE=3 and run the testsuite.
- name: build_fortify_source
run: |
CFLAGS=-D_FORTIFY_SOURCE=3 build/muon setup build_fortify_source
build/muon -C build_fortify_source samu
- name: test_fortify_source
run: |
cd build_fortify_source
./muon test -d dots
3 changes: 2 additions & 1 deletion tests/fmt/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-FileCopyrightText: Stone Tickle <[email protected]>
# SPDX-License-Identifier: GPL-3.0-only

test('fmt', find_program('test.sh'), args: muon, suite: 'fmt')
# Increased timeout necessary to avoid sporadic timeouts on GitHub ubuntu workflow
test('fmt', find_program('test.sh'), args: muon, suite: 'fmt', timeout: 45)

subdir('editorconfig')

0 comments on commit 38abb00

Please sign in to comment.