Skip to content

Commit 72b51f8

Browse files
authored
Merge pull request #22 from karmanyaahm/main
Move cross compilation into docker dependency
2 parents 0c55cf0 + a30ac6d commit 72b51f8

File tree

2 files changed

+5
-25
lines changed

2 files changed

+5
-25
lines changed

.github/workflows/build.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ jobs:
1111
runs-on: ubuntu-18.04
1212
steps:
1313
- uses: actions/checkout@v2
14-
- uses: docker://archlinux:base-devel
15-
with:
16-
args: make arch-container-init
14+
- run: make build-docker
1715
- name: Release
1816
uses: svenstaro/upload-release-action@v2
1917
with:

Makefile

+4-22
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,7 @@ build-prod:
1111
test: build-local
1212
go test ./...
1313

14-
#Go compiling using CGo(sqlite) AND for Alpine on top of that created most of this confusion
15-
16-
archlinux-deps-prod: archlinux-deps-init archlinux-deps
17-
18-
archlinux-deps-init:
19-
sudo pacman -Syu --needed --noconfirm git base-devel
20-
mkdir -p ~/Downloads; \
21-
cd ~/Downloads; \
22-
git clone https://aur.archlinux.org/yay-bin.git; \
23-
cd yay-bin; \
24-
makepkg -si --noconfirm
25-
archlinux-deps:
26-
# aarch64 gnu - amd64 alpine - aarch64 alpine - 32bit gnu - 32 bit gnu - go
27-
yay --noconfirm --needed -S aarch64-linux-gnu-gcc musl aarch64-linux-musl lib32-glibc lib32-gcc-libs go
28-
29-
arch-container-init:
30-
echo 'ParallelDownloads=5' >> /etc/pacman.conf
31-
useradd -m -s /bin/sh builder
32-
pacman -Syu sudo --noconfirm --needed
33-
echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
34-
chmod ugo+rwx .
35-
sudo -u builder make archlinux-deps-prod build-prod
14+
build-docker:
15+
mkdir bin
16+
chmod ugo+rwx bin
17+
docker run --rm -v `pwd`:/app ghcr.io/karmanyaahm/mega_go_arch_xcompiler:v0.2.1 build np2p

0 commit comments

Comments
 (0)