Skip to content

Commit

Permalink
Default to dylan-tool@0.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cgay committed Mar 3, 2024
1 parent af61290 commit e3aedd4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 41 deletions.
42 changes: 28 additions & 14 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,46 @@ on:
branches:
- main

# This enables the Run Workflow button on the Actions tab.
# This enables the Run Workflow button here:
# https://github.com/dylan-lang/install-dylan-tool/actions/workflows/build-and-test.yml
workflow_dispatch:

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:

- uses: dylan-lang/install-dylan-tool@main

- name: Create workspace
run: |
./dylan new workspace pc
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
repository: dylan-lang/pacman-catalog
path: pc/pacman-catalog

# Use HEAD to make sure we test our changes to actions.yml. Is this
# correct? Using ${{ github.sha }} didn't work ('github' not found).
- uses: dylan-lang/install-dylan-tool@HEAD

- name: debug A
run: |
echo "PATH=${PATH}"
pwd
find .. -maxdepth 2
ls -l ..
dylan version
- name: Build pacman-catalog-test-suite
run: |
cd pc
DYLAN_CATALOG=./pacman-catalog ../dylan update
../dylan-compiler -build -jobs 3 pacman-catalog-test-suite
echo "PATH=${PATH}"
pwd
find .. -maxdepth 2
ls -l ..
DYLAN_CATALOG=. ../dylan update
dylan build pacman-catalog-test-suite
- name: Run pacman-catalog-test-suite
run: |
cd pc
DYLAN_CATALOG=./pacman-catalog _build/bin/pacman-catalog-test-suite
DYLAN_CATALOG=. _build/bin/pacman-catalog-test-suite --report surefire --report-file _build/pacman-catalog-tests.xml
- name: Publish test report
if: success() || failure()
uses: mikepenz/action-junit-report@v4
with:
report_paths: '**/_build/*-tests.xml'
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,21 @@ invokes the
To install the latest dylan-tool release:

```yaml
- uses: dylan-lang/install-dylan-tool@v2
- uses: dylan-lang/install-dylan-tool@v3
```
To install a specific released version:
```yaml
- uses: dylan-lang/install-dylan-tool@v2
- uses: dylan-lang/install-dylan-tool@v3
with:
tag: v1.2.3
tag: v0.12.0
```
`tag` must exactly match a tagged version in the [dylan-tool
repository](https://github.com/dylan-lang/dylan-tool).

**Important:** This Action must be used **after**
[actions/checkout@v3](https://github.com/actions/checkout) when using the
default `path:` (i.e., the current directory) because `actions/checkout@v3`
deletes everything in the repo directory first.

When this Action has completed, three artifacts exist in the current directory:

1. A symbolic link to the `dylan` executable.

2. A symbolic link to the `dylan-compiler` executable.

3. A symbolic link named `opendylan` that points to the Open Dylan
installation directory.
When this Action has completed the `dylan` executable is available on the `PATH`.

See the [hello](https://github.com/cgay/hello) repository for the canonical
example of using this Action.
16 changes: 5 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,24 @@ inputs:
tag:
required: false
type: string
default: v0.8.0
default: v0.11.0

runs:
using: composite
steps:
- uses: dylan-lang/install-opendylan@v3

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: dylan-lang/dylan-tool
submodules: recursive
ref: ${{ inputs.tag }}
# Must be under ${GITHUB_WORKSPACE}. We mv this below.
path: dylan-tool

- name: Build dylan-tool
- name: Build and install dylan-tool
shell: bash
run: |
TOP=$(realpath ${GITHUB_WORKSPACE}/..)
cd ${TOP}
# Remove the link install-opendylan@v3 creates itself.
rm -f dylan
mv ${GITHUB_WORKSPACE}/dylan-tool .
DYLAN=${TOP} make -C dylan-tool install
ln -s install/dylan-tool/bin/dylan-tool-app dylan
DYLAN=${GITHUB_WORKSPACE}/dylan-tool make -C dylan-tool install
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
echo "${PWD}" >> ${GITHUB_PATH}
echo "${GITHUB_WORKSPACE}/dylan-tool/install/bin" >> ${GITHUB_PATH}

0 comments on commit e3aedd4

Please sign in to comment.