-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
351 additions
and
114 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,116 @@ | ||
name: zinit installer | ||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
zinit-installer: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
# TODO: macOS (jobs hang...) | ||
# TODO: Windows... | ||
# os: [ubuntu-latest, macos-11] | ||
# os: [ubuntu-latest, macos-latest, windows-latest] | ||
annexes: ["with-annexes", "without-annexes"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Grab git slugs (short commit id, branch etc.) | ||
uses: rlespinasse/github-slug-action@v3.x | ||
|
||
- name: Install dependencies (ubuntu) | ||
if: startsWith(matrix.os, 'ubuntu-latest') | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y curl git zsh | ||
- name: Install dependencies (macOS) | ||
if: startsWith(matrix.os, 'macos') | ||
run: | | ||
brew install curl git zsh | ||
- name: Install zinit (with annexes) | ||
if: matrix.annexes == 'with-annexes' | ||
run: | | ||
export ZINIT_COMMIT="$GITHUB_SHA" | ||
export ZINIT_REPO="$GITHUB_REPOSITORY" | ||
export ZINIT_BRANCH="$GITHUB_REF_SLUG" | ||
export NO_INPUT=true | ||
sh -x ./doc/install.sh | ||
- name: Install zinit (w/o annexes) | ||
if: matrix.annexes == 'without-annexes' | ||
run: | | ||
export ZINIT_COMMIT="$GITHUB_SHA" | ||
export ZINIT_REPO="$GITHUB_REPOSITORY" | ||
export ZINIT_BRANCH="$GITHUB_REF_SLUG" | ||
export NO_INPUT=true | ||
export NO_ANNEXES=true | ||
sh -x ./doc/install.sh | ||
- name: Upload zshrc and zinit files | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: zinit-config-${{ matrix.os }}-${{ matrix.annexes }} | ||
path: | | ||
/home/runner/.zshrc | ||
/home/runner/.local/share/zinit | ||
- name: Test zinit install | ||
run: | | ||
export TERM=xterm | ||
zsh -silc 'zinit --help; exit $?' | ||
# TODO: DRY! | ||
# Re-using steps in GH Actions is a pain though. | ||
zinit-updater: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
# TODO: macOS (jobs hang...) | ||
# TODO: Windows... | ||
# os: [ubuntu-latest, macos-11] | ||
# os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Grab git slugs (short commit id, branch etc.) | ||
uses: rlespinasse/github-slug-action@v3.x | ||
|
||
- name: Install dependencies (ubuntu) | ||
if: startsWith(matrix.os, 'ubuntu-latest') | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y curl git zsh | ||
- name: Install dependencies (macOS) | ||
if: startsWith(matrix.os, 'macos') | ||
run: | | ||
brew install curl git zsh | ||
- name: Install previous zinit version (${{ github.event.before }}) | ||
env: | ||
PREVIOUS_COMMIT: ${{ github.event.before }} | ||
run: | | ||
export ZINIT_COMMIT="$PREVIOUS_COMMIT" | ||
export ZINIT_REPO="$GITHUB_REPOSITORY" | ||
export ZINIT_BRANCH="$GITHUB_REF_SLUG" | ||
export NO_INPUT=true | ||
./doc/install.sh | ||
- name: Update zinit from ${{ github.event.before }} to ${{ github.sha }} | ||
run: | | ||
export ZINIT_COMMIT="$GITHUB_SHA" | ||
export ZINIT_REPO="$GITHUB_REPOSITORY" | ||
export ZINIT_BRANCH="$GITHUB_REF_SLUG" | ||
export NO_INPUT=true | ||
./doc/install.sh |
Oops, something went wrong.