mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-03 22:38:41 +02:00
feat(ci): add nicer workflows
between all those changes, now x64 builds should be produced
This commit is contained in:
parent
ca95d390c2
commit
b900701b8f
15
.github/workflows/build-check.yml
vendored
Normal file
15
.github/workflows/build-check.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
name: Test Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check_build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: ./.github/workflows/build.yml
|
47
.github/workflows/build.yml
vendored
Normal file
47
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
name: Build Project
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- arch_name: x86_64
|
||||||
|
cc: gcc
|
||||||
|
cflags:
|
||||||
|
- arch_name: x64
|
||||||
|
cc: gcc
|
||||||
|
cflags: -m32
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||||
|
with:
|
||||||
|
packages: libpam0g-dev
|
||||||
|
version: 1.0
|
||||||
|
|
||||||
|
- name: Build Code
|
||||||
|
run: |
|
||||||
|
make CC=${{ matrix.cc }} CFLAGS="-O3 ${{ cflags }}"
|
||||||
|
mv lidm lidm-${{ matrix.arch_name }}
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: build-${{ matrix.arch_name }}
|
||||||
|
path: lidm-${{ matrix.arch_name }}
|
||||||
|
|
||||||
|
merge-builds:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Merge Artifacts
|
||||||
|
uses: actions/upload-artifact/merge@v4
|
||||||
|
with:
|
||||||
|
name: all-builds
|
||||||
|
pattern: build-*
|
||||||
|
delete-merged: true
|
||||||
|
retention-days: 1
|
28
.github/workflows/release.yml
vendored
28
.github/workflows/release.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: C Make
|
name: Build for Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
@ -10,14 +10,20 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Build Project
|
||||||
- name: Install deps
|
uses: ./.github/workflows/build.yml
|
||||||
run: sudo apt-get install -y libpam0g-dev
|
|
||||||
- name: make
|
- uses: actions/download-artifact@v4
|
||||||
run: make
|
|
||||||
- uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
name: all-builds
|
||||||
file: lidm
|
path: builds
|
||||||
asset_name: lidm-x86_64 # will compile for more archs other day
|
|
||||||
tag: ${{ github.ref }}
|
- name: Upload Builds to Release
|
||||||
|
run: |
|
||||||
|
cd builds
|
||||||
|
for file in ./*; do
|
||||||
|
echo "Uploading $file..."
|
||||||
|
gh release upload ${{ github.event.release.tag_name }} "$file" --clobber
|
||||||
|
done
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user