Skip to content

Install to target

Install to target #356

Workflow file for this run

name: package
on:
push:
paths:
- '.github/workflows/package.yml'
- 'custom-prompt/*'
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build_windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- run: |
git clone https://github.com/libgit2/libgit2.git
mkdir -p libgit2/build libgit2/target && cd libgit2/build
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../target -DBUILD_CLI=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF
cmake --build . --target install
find $PWD/../target
make -j release
# build_macos_windows:
# name: build on ${{ matrix.os.name }}
# runs-on: ${{ matrix.os.name }}
# strategy:
# matrix:
# os: [{name: 'macos-13', id: 'amd64-macos'}, {name: 'macos-14', id: 'aarch64-macos'}, {name: 'windows-2022', id: 'amd64-windows'}]
# steps:
# - uses: actions/checkout@v4
# - run: make -j release
# working-directory: custom-prompt
# - uses: actions/upload-artifact@v3
# with:
# name: custom-prompt-${{ matrix.os.id }}
# path: 'custom-prompt/bin'
# build_linux:
# name: build on ${{ matrix.arch }}/${{ matrix.os.name }}:${{ matrix.os.tag }}
# runs-on: ubuntu-22.04
# container: ${{ matrix.arch }}/${{ matrix.os.name }}:${{ matrix.os.tag }}
# strategy:
# matrix:
# arch: [amd64, i386]
# os: [{name: 'alpine', tag: '3.20', libc: 'musl'}, {name: 'debian', tag: '12', libc: 'gnu'}]
# steps:
# - if: matrix.os.name == 'alpine'
# run: apk add build-base libnotify-dev libx11-dev
# - if: matrix.os.name == 'debian'
# run: apt-get update && apt-get install -y build-essential libnotify-dev libx11-dev
# - uses: actions/checkout@v1
# - run: make -j release
# working-directory: custom-prompt
# - uses: actions/upload-artifact@v1
# with:
# name: custom-prompt-${{ matrix.arch }}-linux-${{ matrix.os.libc }}
# path: 'custom-prompt/bin'
# release:
# if: github.ref_type == 'tag'
# needs: [build_macos_windows, build_linux]
# runs-on: ubuntu-22.04
# permissions: write-all
# steps:
# - uses: actions/checkout@v4
# - uses: actions/download-artifact@v3
# - run: |
# chmod --recursive +x .
# for package_directory in custom-prompt-*
# do
# (
# cd $package_directory
# tar cfvz ${package_directory}.tgz *
# )
# done
# name: Create compressed archives of executable binaries
# - run: |
# gh release create ${{ github.ref_name }} -t ${{ github.ref_name }} --generate-notes
# gh release upload ${{ github.ref_name }} */*.tgz
# name: Publish release
# env:
# GH_TOKEN: ${{ github.token }}