-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: quick and dirty github step to install nightly mojo
- Loading branch information
0 parents
commit ba75750
Showing
4 changed files
with
69 additions
and
0 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,17 @@ | ||
name: Test Setup Mojo Action | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Mojo | ||
uses: ./ | ||
with: | ||
version: '2024.7.1805' | ||
- name: Verify Mojo installation | ||
run: | | ||
mojo --version | ||
echo "Modular Home: $MODULAR_HOME" |
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,30 @@ | ||
# Github Action for setting up Mojo | ||
|
||
Quick and dirty Github Action for setting up Mojo. | ||
|
||
Usage: | ||
|
||
```yaml | ||
name: Test Setup Mojo Action | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Mojo | ||
uses: kszucs/setup-mojo@latest | ||
with: | ||
version: '2024.7.1805' | ||
- name: Verify Mojo installation | ||
run: | | ||
mojo --version | ||
echo "Modular Home: $MODULAR_HOME" | ||
``` | ||
TODOs: | ||
- [ ] Prefix the installation path with the version | ||
- [ ] Bake in caching to speed up the installation | ||
- [ ] Test other platforms |
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,11 @@ | ||
name: 'Setup Mojo' | ||
description: 'Set up Mojo language' | ||
inputs: | ||
version: | ||
description: 'The Mojo version to install' | ||
required: true | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- run: ./setup-mojo.sh ${{ inputs.version }} | ||
shell: bash |
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,11 @@ | ||
set -e | ||
|
||
VERSION=$1 | ||
|
||
curl -s https://get.modular.com | sh - | ||
|
||
modular auth test | ||
modular install nightly/mojo --install-version $VERSION | ||
|
||
echo "MODULAR_HOME=/home/runner/.modular" >> $GITHUB_ENV | ||
echo "PATH=$PATH:/home/runner/.modular/pkg/packages.modular.com_nightly_mojo/bin" >> $GITHUB_ENV |