-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding CI job to build static libs on amd64/arm64
- Loading branch information
Showing
3 changed files
with
80 additions
and
0 deletions.
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/* |