GitHub Action that will setup a Pharo environment with a specific version. Works on Ubuntu, macOS and Windows runners.
It will install the Pharo Virtual Machine as well as the Pharo image of the version specified as parameter.
It will also add some environment variables to ease the use of Pharo.
The command to run Pharo will be available in the PHARO
environment variable.
To install and use a Pharo 13 image,
steps:
- uses: demarey/pharo-setup-gha@main
with:
version: 13
- name: Run Pharo
run: |
$PHARO --headless Pharo.image eval 'SystemVersion current printString'
This action supports Windows runners and you can take advantage of it to define jobs that will run on many OS. In this case, you will need to use bash and tell the plugin that you want to use Pharo from bash. In the followin example, you will test on ubuntu, mac Os and Windows 3 different Pharo versions: 11, 12 and 13.
jobs:
build:
strategy:
fail-fast: false
matrix:
version: [11, 12, 13]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: demarey/pharo-setup-gha@main
with:
version: ${{ matrix.version }}
useBashOnWindows: true
- name: Test installation
run: |
$PHARO --headless Pharo.image eval 'SystemVersion current printString'
shell: bash
You can also specify the directory where the VM or the image will be stored:
- uses: demarey/pharo-setup-gha@main
with:
version: 13
imageDir: myImage
vmDir: foo/vm
It is also possible to set the image name with the imageName
parameter.
Uses MIT license.