Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
pull_request:
push:
branches:
- master

jobs:
build-linux:
name: Build ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: amd64
package: ""
cc: "gcc"
# TODO FIX arm - cross-compile
#- name: armv7
# package: "-arm-linux-gnueabihf"
# cc: "arm-linux-gnueabihf-gcc"
#- name: aarch64
# package: "-aarch64-linux-gnu"
# cc: "aarch64-linux-gnu-gcc"
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
sudo apt update
sudo apt install -y make libsdl2-image-dev gcc-10${{ matrix.package }}
- name: Build
#env:
# CFLAGS: "-I/usr/include/x86_64-linux-gnu/SDL2 -I/usr/include/x86_64-linux-gnu"
run: make -C src -j $(nproc) all CC=${{ matrix.cc }}-10
- name: List
run: ls -l --color

35 changes: 35 additions & 0 deletions .github/workflows/check-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Check new version

on:
push:
branches:
- master
paths:
- 'src/config.h'

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check version
id: config
run: |
VERSION=$(awk '/SDLPOP_VERSION/ {print $3}' src/config.h | head -n1 | tr -d '"')
echo "Version: $VERSION"
echo "::set-output name=version::$VERSION"
- uses: mukunku/tag-exists-action@v1.0.0
id: checkTag
with:
tag: v${{ steps.config.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Tag new version
if: ${{ steps.checkTag.outputs.exists != 'true' }}
uses: tvdias/github-tagger@v0.0.2
with:
# NOTE: May need PAT Token instead of Github Token.
repo-token: ${{ secrets.GITHUB_TOKEN }}
tag: v${{ steps.config.outputs.version }}