Skip to content

Continuous Delivery Workflow#4

Open
leober-ramos33 wants to merge 4 commits into
DarkMatterCore:masterfrom
leober-ramos33:master
Open

Continuous Delivery Workflow#4
leober-ramos33 wants to merge 4 commits into
DarkMatterCore:masterfrom
leober-ramos33:master

Conversation

@leober-ramos33
Copy link
Copy Markdown

When you create a new tag in Git using Semantic Version for its name, the process of creating a Release in GitHub will automatically start, uploading the files compiled with MinGW for the x86 and x64 architecture of Windows, in addition of a compiled file for Linux x64.

You can see an example of how it works here: https://github.com/yonaikerlol/sbn64/releases/tag/v1.74

Copy link
Copy Markdown
Owner

@DarkMatterCore DarkMatterCore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed your changes. Please read the comments I left - they'll help you change what's needed before merging your PR.

i686-w64-mingw32-gcc -std=c99 -Wall -Wextra -O2 sbn64.c -o sbn64_Windows_x86.exe
i686-w64-mingw32-strip sbn64_Windows_x86.exe

- name: Compile sbn64 for Windows (x64)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to the very minimalistic nature of this project, only providing 32-bit builds for each supported OS would be preferred.

- name: Compile sbn64 for Windows (x86)
run: |
i686-w64-mingw32-gcc -std=c99 -Wall -Wextra -O2 sbn64.c -o sbn64_Windows_x86.exe
i686-w64-mingw32-strip sbn64_Windows_x86.exe
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If only 32-bit builds are provided, rename the output file to just sbn64.exe.

x86_64-w64-mingw32-gcc -std=c99 -Wall -Wextra -O2 sbn64.c -o sbn64_Windows_x64.exe
x86_64-w64-mingw32-strip sbn64_Windows_x64.exe

- name: Compile sbn64 for Linux (x64)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generate a 32-bit build instead of a 64-bit build.

Comment thread Makefile
@mkdir -p $(dir $(OBJECTS))
@mkdir -p $(BIN_PATH)

# Installs to the set path
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unnecessary Makefile section.

Comment thread Makefile
@echo "Installing to $(DESTDIR)$(INSTALL_PREFIX)/bin"
@$(INSTALL_PROGRAM) $(BIN_PATH)/$(BIN_NAME) $(DESTDIR)$(INSTALL_PREFIX)/bin

# Uninstalls the program
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unnecessary Makefile section.

Comment thread Makefile
release: export BUILD_PATH := build/release
release: export BIN_PATH := bin/release
debug: export BUILD_PATH := build/debug
debug: export BIN_PATH := bin/debug
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove line.

Comment thread Makefile
@echo -n "Total build time: "
@$(END_TIME)

# Debug build for gdb debugging
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unnecessary Makefile section.

Comment thread Makefile
@$(RM) $(BIN_NAME)
@ln -s $(BIN_PATH)/$(BIN_NAME) $(BIN_NAME)

# Link the executable
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing strip call.


- name: Compile sbn64 for Windows (x86)
run: |
i686-w64-mingw32-gcc -std=c99 -Wall -Wextra -O2 sbn64.c -o sbn64_Windows_x86.exe
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC should be exported as an environment variable and make should be called, instead of manually building the binary by directly running the compiler.


- name: Compile sbn64 for Linux (x64)
run: |
gcc -std=c99 -Wall -Wextra -O2 sbn64.c -o sbn64_Linux_x64
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue here, CC should be exported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants