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 205d4a3
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
10 changes: 7 additions & 3 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: autobuild
- 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 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 205d4a3

Please sign in to comment.