Skip to content

Commit

Permalink
(MINOR) support installing nightly builds
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolSpy3 committed Jul 28, 2024
1 parent 5d92c82 commit 8bc5835
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
34 changes: 33 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: [ main ]

jobs:
test:
testStableWebots:
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -37,6 +37,38 @@ jobs:
echo "steps.setupWebots.outputs.cachePath: ${{ steps.setupWebots.outputs.cachePath }}"
shell: bash

testNightlyWebots:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Setup Webots
id: setupWebots
uses: ./
with:
webotsVersion: R2024a
webotsTag: nightly_26_7_2024

- name: Run Webots
run: $RUN_WEBOTS --sysinfo
shell: bash

- name: Display outputs
run: |
echo "RUN_WEBOTS: $RUN_WEBOTS"
echo "steps.setupWebots.outputs.bashCmd: ${{ steps.setupWebots.outputs.bashCmd }}"
echo "steps.setupWebots.outputs.home: ${{ steps.setupWebots.outputs.home }}"
echo "steps.setupWebots.outputs.binDir: ${{ steps.setupWebots.outputs.binDir }}"
echo "steps.setupWebots.outputs.bin: ${{ steps.setupWebots.outputs.bin }}"
echo "steps.setupWebots.outputs.cachePath: ${{ steps.setupWebots.outputs.cachePath }}"
shell: bash

release:
# Only release from the main branch
if: github.ref == 'refs/heads/main'
Expand Down
9 changes: 7 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ inputs:
webotsVersion:
description: "Version of Webots to install."
required: true
webotsTag:
description: "Optionally specify a specific tag from the Webots repository to install. (Defaults to webotsVersion)"
required: false
default: ${{ inputs.webotsVersion }}

outputs:
bashCmd:
description: "Start of a command line in bash which will run webots on all runners with options suitable for headless execution. This is also put in the RUN_WEBOTS environment variable."
Expand Down Expand Up @@ -69,12 +74,12 @@ runs:
id: cache
with:
path: ${{ steps.setup.outputs.cachePath }}
key: ${{ runner.os }}-webots-${{ inputs.webotsVersion }}
key: ${{ runner.os }}-webots-${{ inputs.webotsTag }}
save-always: true
- name: 'Download Webots'
if: steps.cache.outputs.cache-hit != 'true'
run: |
curl -L -o "${{ steps.setup.outputs.cachePath }}/${{ steps.setup.outputs.pkgName }}" --create-dirs "https://github.com/cyberbotics/webots/releases/download/${{ inputs.webotsVersion }}/${{ steps.setup.outputs.pkgName }}"
curl -L -o "${{ steps.setup.outputs.cachePath }}/${{ steps.setup.outputs.pkgName }}" --create-dirs "https://github.com/cyberbotics/webots/releases/download/${{ inputs.webotsTag }}/${{ steps.setup.outputs.pkgName }}"
if [ '${{ runner.os }}' = 'Windows' ]; then
curl -L -o "${{ steps.setup.outputs.cachePath }}/Mesa.7z" --create-dirs https://downloads.fdossena.com/geth.php?r=mesa64-latest
fi
Expand Down

0 comments on commit 8bc5835

Please sign in to comment.