Skip to content

Commit

Permalink
workflows: set KERN_HEADERS env as INCLUDE_PATH on docker qemu(arm64)
Browse files Browse the repository at this point in the history
Signed-off-by: CFC4N <[email protected]>
  • Loading branch information
cfc4n committed Apr 29, 2024
1 parent 14a0455 commit 8826649
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/go-c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:
uname -a
apt-get update
kernel_ver=`uname -r | cut -d'-' -f 1`
apt-get install --yes wget git build-essential pkgconf libelf-dev llvm-12 clang-12 linux-tools-generic linux-tools-common flex bison file gcc-x86-64-linux-gnu libssl-dev bc linux-source-${kernel_ver}
apt-get install --yes wget git build-essential pkgconf libelf-dev llvm-12 clang-12 linux-tools-generic linux-tools-common flex bison file gcc-x86-64-linux-gnu libssl-dev bc linux-source-${kernel_ver}
wget https://go.dev/dl/go1.21.0.linux-arm64.tar.gz
rm -rf /usr/local/go
tar -C /usr/local -xzf go1.21.0.linux-arm64.tar.gz
Expand All @@ -182,6 +182,7 @@ jobs:
cd /usr/src/linux-source-${kernel_ver}
test -f .config || make oldconfig > /dev/null
make ARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- prepare V=0 > /dev/null
make prepare V=0 > /dev/null
ls -al /usr/src/linux-source-${kernel_ver}
# Produce a binary artifact and place it in the mounted volume
run: |
Expand All @@ -202,20 +203,16 @@ jobs:
cat /proc/1/sched
git config --global --add safe.directory /source_code
cd /source_code
echo "-------------------start: Build CO-RE Linux -------------------"
make env
echo "-------------------start: Build CO-RE Linux (include non-CO-RE)-------------------"
KERN_HEADERS=/usr/src/linux-source-${kernel_ver} make env
make clean
make
KERN_HEADERS=/usr/src/linux-source-${kernel_ver} make
bin/ecapture -v
echo "-------------------start: Build CO-RE (Cross-Compilation) Linux -------------------"
echo "-------------------start: Build non-CO-RE (Cross-Compilation) Linux -------------------"
make clean
CROSS_ARCH=amd64 make env
CROSS_ARCH=amd64 make -j8
echo "-------------------start: Build non-CO-RE Android -------------------"
make clean
make env
ANDROID=1 make nocore -j2
KERN_HEADERS=/usr/src/linux-source-${kernel_ver} CROSS_ARCH=amd64 make env
KERN_HEADERS=/usr/src/linux-source-${kernel_ver} CROSS_ARCH=amd64 make nocore -j8
file bin/ecapture
- name: Show the artifact
# Items placed in /artifacts in the container will be in
# ${PWD}/artifacts on the host.
Expand Down
2 changes: 2 additions & 0 deletions builder/Makefile.release
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ snapshot: \
.check_$(CMD_TAR) \
.check_$(CMD_CHECKSUM) \
.check_$(CMD_GITHUB)
$(call allow-override,ANDROID,0)
$(call release_tar,linux,)

.PHONY: snapshot_android
Expand All @@ -107,6 +108,7 @@ snapshot_android: \
.check_$(CMD_TAR) \
.check_$(CMD_CHECKSUM) \
.check_$(CMD_GITHUB)
$(call allow-override,ANDROID,1)
$(call release_tar,android,)

.PHONY: publish
Expand Down
2 changes: 1 addition & 1 deletion functions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ define release_tar
$(call allow-override,TAR_DIR,ecapture-$(DEB_VERSION)-$(1)-$(GOARCH)$(CORE_PREFIX))
$(call allow-override,OUT_ARCHIVE,$(OUTPUT_DIR)/$(TAR_DIR).tar.gz)
$(CMD_MAKE) clean
$(CMD_MAKE) $(2)
ANDROID=$(ANDROID) $(CMD_MAKE) $(2)
# create the tar ball and checksum files
$(CMD_MKDIR) -p $(TAR_DIR)
$(CMD_CP) LICENSE $(TAR_DIR)/LICENSE
Expand Down

0 comments on commit 8826649

Please sign in to comment.