-
Notifications
You must be signed in to change notification settings - Fork 1
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
fixing buildlibs.sh script + cmark reference in config.nims + prebuilt arm linux libs #113
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,20 @@ | ||
FROM ghcr.io/crashappsec/nim:ubuntu-2.0.0 as nim | ||
|
||
# https://github.com/actions/runner/issues/2033 | ||
RUN if which git; then git config --global --add safe.directory "*"; fi | ||
|
||
# deps for compiling static deps | ||
RUN apt-get update -y && \ | ||
apt-get install -y \ | ||
autoconf \ | ||
cmake \ | ||
file \ | ||
g++ \ | ||
gcc \ | ||
git \ | ||
m4 \ | ||
make \ | ||
&& \ | ||
apt-get clean -y | ||
|
||
WORKDIR /con4m |
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,9 @@ | ||
services: | ||
staticlibs: | ||
build: | ||
context: .. | ||
dockerfile: .github/Dockerfile.staticlibs | ||
working_dir: /con4m | ||
volumes: | ||
- ..:/con4m | ||
- $HOME/.local/c0:/root/.local/c0 |
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,51 @@ | ||
name: staticlibs | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
|
||
jobs: | ||
buildlibs: | ||
runs-on: ${{ matrix.builder }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- builder: ubuntu-latest | ||
arch: amd64 | ||
os: linux | ||
- builder: buildjet-2vcpu-ubuntu-2204-arm | ||
arch: arm64 | ||
os: linux | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Show Static Libs | ||
run: | | ||
set -x | ||
ls -la ~/.local/c0/libs/* || true | ||
ls -la files/deps/lib/* || true | ||
|
||
- name: Clean up existing libs | ||
run: | | ||
rm -rf files/deps/lib/* | ||
|
||
- name: Build Static Libs | ||
working-directory: ./.github | ||
run: | | ||
docker compose run --rm staticlibs nimble build | ||
|
||
- name: Show Static Libs | ||
run: | | ||
set -x | ||
ls -la ~/.local/c0/libs/* || true | ||
ls -la files/deps/lib/* || true | ||
|
||
- name: Save Artifact | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: ${{ matrix.os }}-${{ matrix.arch }} | ||
path: ~/.local/c0/libs/* |
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
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 |
---|---|---|
|
@@ -139,6 +139,15 @@ function ensure_musl { | |
if [[ ${OS} = "macosx" ]] ; then | ||
return | ||
fi | ||
if [[ ! -f ${MUSL_GCC} ]] ; then | ||
# if musl-gcc is already installed, use it | ||
existing_musl=$(which musl-gcc 2> /dev/null) | ||
if [[ -n "${existing_musl}" ]]; then | ||
Comment on lines
+143
to
+145
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if
|
||
mkdir -p $(dirname ${MUSL_GCC}) | ||
ln -s ${existing_musl} ${MUSL_GCC} | ||
echo $(color GREEN Linking existing musl-gcc: ) ${existing_musl} $(color GREEN "->" ) ${MUSL_GCC} | ||
fi | ||
fi | ||
if [[ ! -f ${MUSL_GCC} ]] ; then | ||
get_src musl git://git.musl-libc.org/musl | ||
colorln CYAN Building musl | ||
|
@@ -220,7 +229,7 @@ function ensure_gumbo { | |
ensure_musl | ||
get_src sigil-gumbo https://github.com/Sigil-Ebook/sigil-gumbo/ | ||
colorln CYAN "Watching our waistline, selecting only required gumbo ingredients..." | ||
cat > CMakelists.txt <<EOL | ||
cat > CMakeLists.txt <<EOL | ||
cmake_minimum_required( VERSION 3.0 ) | ||
|
||
project(gumbo) | ||
|
Binary file not shown.
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 @@ | ||
!<arch> |
Binary file not shown.
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 @@ | ||
!<arch> |
Binary file not shown.
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 @@ | ||
!<arch> |
Binary file not shown.
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 @@ | ||
!<arch> |
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 @@ | ||
!<arch> |
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 @@ | ||
!<arch> |
Binary file not shown.
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 @@ | ||
!<arch> |
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 @@ | ||
!<arch> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love this, they might not have permission to install the headers. Things can go wrong. They can delete the thing after they build it, and indeed the script does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait this was merged???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vanilla
apt-get install musl-tools
installs correct musl and I am able to use it in chalk docker buildsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what you mean if it was merged. PR is still open