-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build vim with Docker and publish binaries
- Loading branch information
Showing
4 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
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,69 @@ | ||
name: vim-build | ||
|
||
on: | ||
schedule: | ||
- cron: "45 5 * * Sun" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: clone https://github.com/heywoodlh/vim-builds | ||
uses: actions/checkout@master | ||
with: | ||
name: heywoodlh/vim-builds | ||
repository: heywoodlh/vim-builds | ||
path: ./vim-builds | ||
|
||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- | ||
name: Build vim-builds amd64 container | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./vim-builds | ||
file: ./vim-builds/Dockerfile | ||
platforms: linux/amd64 | ||
tags: heywoodlh/vim-builds-x86_64:latest | ||
load: true | ||
|
||
- | ||
name: Build vim-builds arm64 container | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./vim-builds | ||
file: ./vim-builds/Dockerfile | ||
platforms: linux/arm64 | ||
tags: heywoodlh/vim-builds-arm64:latest | ||
load: true | ||
|
||
- | ||
name: Copy vim binaries from vim-builds container | ||
run: | | ||
# Copy vim binaries | ||
amd64_id=$(docker create --platform=linux/amd64 heywoodlh/vim-builds-x86_64) | ||
arm64_id=$(docker create --platform=linux/arm64 heywoodlh/vim-builds-arm64) | ||
docker cp ${amd64_id}:/out/vim-x86_64 vim-x86_64 | ||
docker cp ${arm64_id}:/out/vim-aarch64 vim-arm64 | ||
docker rm -f ${amd64_id} | ||
docker rm -f ${arm64_id} | ||
# Get version | ||
export VIM_VERSION=$(./vim-x86_64 --version | head -1 | cut -d'(' -f1 | awk '{print $NF}') | ||
echo VIM_VERSION=${VIM_VERSION} >> $GITHUB_ENV | ||
# Remove vim-builds directory | ||
rm -rf vim-builds | ||
- | ||
name: Create release using compiled vim binaries | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ env.VIM_VERSION }} | ||
artifacts: 'vim-*' |
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,11 @@ | ||
FROM alpine | ||
|
||
RUN apk add --no-cache gcc make musl-dev ncurses-static git \ | ||
&& git clone https://github.com/vim/vim /opt/vim \ | ||
&& cd /opt/vim \ | ||
&& LDFLAGS="-static" ./configure --disable-channel --disable-gpm --disable-gtktest --disable-gui --disable-netbeans --disable-nls --disable-selinux --disable-smack --disable-sysmouse --disable-xsmp --enable-multibyte --with-features=huge --without-x --with-tlib=ncursesw \ | ||
&& make \ | ||
&& make install \ | ||
&& mkdir -p /out/ \ | ||
&& cp /usr/local/bin/vim /out/vim-$(arch) \ | ||
&& chown -R $(id -u):$(id -g) /out/vim-$(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 |
---|---|---|
@@ -1 +1 @@ | ||
Statically linked, cross-platform and cross-architecture Vim binaries for MacOS and Linux built with GitHub Actions. | ||
Statically linked, cross-architecture Vim binaries for Linux built with GitHub Actions. |