Skip to content

Commit

Permalink
ci: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiphereth-A committed Apr 24, 2024
1 parent bde9f78 commit df47771
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
pull_request:
branches: [ "master" ]
schedule:
- cron: '28 14 * * 6'
- cron: '0 0 * * 6'

jobs:
analyze:
Expand All @@ -44,8 +44,8 @@ jobs:
fail-fast: false
matrix:
include:
# - language: c-cpp
# build-mode: autobuild
- language: c-cpp
build-mode: manual
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
Expand Down Expand Up @@ -73,6 +73,10 @@ jobs:
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

- name: Autobuild
if: matrix.build-mode == 'autobuild'
uses: github/codeql-action/autobuild@v3

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
Expand All @@ -81,12 +85,7 @@ jobs:
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
make all
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches:
- master
paths:
- '**.hpp'
- '**.cpp'
- '**.tex'
pull_request:
branches:
- master
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
push:
branches:
- master
paths:
- '**.hpp'
- '**.cpp'
pull_request:
branches:
- master
Expand Down
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# AIGC

# Compiler
CXX := g++-12
# Compiler flags
CXXFLAGS := -std=gnu++20 -Wall -Wextra

# Directories
SRCDIRS := src/test_tinplate src/test_cpverifier
# Source files
SOURCES := $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*/*.cpp))
# Object files
OBJECTS := $(SOURCES:.cpp=.o)

# Output directory
OUTDIR := bin
# Target executable
TARGET := $(OUTDIR)/main

# Rule to build the target executable
$(TARGET): $(OBJECTS)
@mkdir -p $(OUTDIR)
$(CXX) $(CXXFLAGS) $^ -o $@

# Rule to compile each source file into object files
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@

# Phony targets
.PHONY: all clean

# Target to build all
all: $(TARGET)

# Target to clean the generated files
clean:
rm -rf $(OUTDIR) $(OBJECTS)

0 comments on commit df47771

Please sign in to comment.