-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2880629
commit 691c2c9
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: C/C++ CI | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
build-essential \ | ||
libgtk-3-dev \ | ||
pkg-config \ | ||
clang | ||
- name: Build with GCC | ||
run: | | ||
make CC=gcc | ||
mv sglauncher sglauncher-$(ldd --version | awk '/ldd/{print "-gnu-" $NF}') | ||
- name: Build with Clang | ||
run: | | ||
make CC=clang | ||
continue-on-error: true | ||
|
||
- name: Build with -Werror | ||
run: | | ||
cc `pkg-config --cflags gtk+-3.0` -Dmver=\"NULL\" -Werror -o sglauncher sglauncher.o `pkg-config --libs gtk+-3.0` -lm --verbose | ||
continue-on-error: true | ||
|
||
- name: Set up variables | ||
id: date | ||
run: | | ||
echo "DATE=$(git log -n 1 --format='%ad' --date=format-local:'%Y%m%d%H%M%S')" >> $GITHUB_ENV | ||
echo "GH_RELEASE_FILE=sglauncher-$(ldd --version | awk '/ldd/{print "-gnu-" $NF}')" >> $GITHUB_ENV | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body: Release ci-${{ env.DATE }} | ||
name: Continuous GitHub CI | ||
tag_name: ${{ env.DATE }} | ||
files: | | ||
${{ env.GH_RELEASE_FILE }} |