Skip to content

Commit

Permalink
Add a basic build and test job (#49927)
Browse files Browse the repository at this point in the history
* Add a basic build and test job

The intention is that this will be a required build and test job that must always pass.
  • Loading branch information
kevingranade authored Jul 14, 2021
1 parent 3a2dc8d commit 5fec688
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 9 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/basic-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Basic Build

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
skip-duplicates:
continue-on-error: false
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths-ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**"]'
basic-build:
needs: skip-duplicates
if: ${{ needs.skip-duplicates.outputs.should_skip != 'true' }}

name: Basic Build and Test (GCC 9, Curses, LTO)
runs-on: ubuntu-latest
env:
COMPILER: g++-9
TEST_STAGE: 1
EXTRA_TEST_OPTS: --error-format=github-action
NATIVE: linux64
GOLD: 1
LTO: 1
RELEASE: 1
steps:
- name: checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: install dependencies (ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libncursesw5-dev ccache gettext parallel
- name: prepare
run: bash ./build-scripts/requirements.sh
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d%H%M")"
shell: bash
- name: ccache cache files (ubuntu)
if: runner.os == 'Linux'
uses: actions/cache@v2
with:
path: ~/.ccache
key: ccache-linux-g++-9-${{ steps.get-date.outputs.date }}
restore-keys: |
ccache-linux-g++-9-
- uses: ammaraskar/gcc-problem-matcher@master
- name: build and test
run: bash ./build-scripts/build.sh
- name: upload artifacts if failed
uses: actions/upload-artifact@v2
if: failure()
with:
name: cata_test
path: tests/cata_test
if-no-files-found: ignore
9 changes: 0 additions & 9 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ jobs:
strategy:
matrix:
include:
- compiler: g++-9
os: ubuntu-latest
cmake: 0
tiles: 0
test-stage: 1
native: linux64
gold: 1
lto: 1
title: GCC 9, Ubuntu, Curses, LTO
- compiler: g++-7
os: ubuntu-latest
cmake: 1
Expand Down

0 comments on commit 5fec688

Please sign in to comment.