Skip to content

installation

installation #155

Workflow file for this run

name: installation
on:
push:
paths:
- "install.sh"
- "install.sp1"
- ".github/workflows/installation.yml"
pull_request:
paths:
- "install.sh"
- "install.sp1"
- ".github/workflows/installation.yml"
workflow_dispatch:
schedule:
- cron: "0 0 * * 0" # run ci weekly
jobs:
build:
name: ${{ matrix.kind }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, ubuntu-latest, windows-latest]
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: full
CARGO_TERM_COLOR: always
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install with shell
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
run: |
sh ./install.sh
echo "${HOME}/.cask/bin" >> $GITHUB_PATH
- name: Install with powershell
if: startsWith(matrix.os, 'windows')
run: |
./install.ps1
# here, cask is already installed
cask --version
# make sure $HOME/.cask/bin has been add to $PATH
cask ls
# However, PowerShell settings will fail in the next step, so add environment variables here.
echo "${HOME}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${HOME}\.cask\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Run cask command
continue-on-error: true
run: |
cask --help
# make sure $HOME/.cask/bin has been add to $PATH
cask ls
# try print information of package
cask info github.com/axetroy/gpm.rs
# install package
cask install github.com/axetroy/gpm.rs
# run installed package
gpm --help