Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous Delivery Workflow #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

leober-ramos33
Copy link

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
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
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
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
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.

@mkdir -p $(dir $(OBJECTS))
@mkdir -p $(BIN_PATH)

# Installs to the set path
Copy link
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.

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

# Uninstalls the program
Copy link
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.

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
Owner

Choose a reason for hiding this comment

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

Remove line.

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

# Debug build for gdb debugging
Copy link
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.

@$(RM) $(BIN_NAME)
@ln -s $(BIN_PATH)/$(BIN_NAME) $(BIN_NAME)

# Link the executable
Copy link
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
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
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