Skip to content

Commit

Permalink
Update for latest Gleam
Browse files Browse the repository at this point in the history
- Gleam releases now use LLVM triplets for platforms so the download
  URLs have been updated accordingly.
- Gleam's rebar3 support has been removed.

This change means that future versions of this action cannot download
older versions of Gleam. I can make it backwards compatible, but I will
need help from someone who can convert the shell script into PowerShell
for Windows.
  • Loading branch information
lpil committed Sep 2, 2022
1 parent 4518ce1 commit d36a391
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 132 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/ubuntu.yml
Expand Up @@ -116,14 +116,17 @@ jobs:
- elixir-version: 'master'
otp-version: '25'
os: 'ubuntu-20.04'
- gleam-version: '0.16'
- gleam-version: 'nightly'
otp-version: '24'
rebar3-version: '3.16'
- gleam-version: '0.23'
otp-version: '24'
rebar3-version: '3.16'
os: 'ubuntu-latest'
- gleam-version: '0.19.0-rc3'
- gleam-version: '0.23.0-rc1'
otp-version: '24'
os: 'ubuntu-latest'
- gleam-version: '0.19.0-rc3'
- gleam-version: '0.23.0-rc1'
otp-version: false
os: 'ubuntu-latest'
steps:
Expand Down Expand Up @@ -166,11 +169,6 @@ jobs:
cd test-projects/erlang_rebar3
rebar3 ct
if: ${{matrix.combo.rebar3-version}}
- name: Run Gleam/rebar3 project tests
run: |
cd test-projects/gleam_rebar3
rebar3 eunit
if: ${{matrix.combo.gleam-version}}
- name: Type check Gleam project (without installing Erlang/OTP)
run: |
cd test-projects/gleam_gleam
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/windows.yml
Expand Up @@ -41,7 +41,7 @@ jobs:
otp-version: '24'
rebar3-version: '3.15'
os: 'windows-latest'
- gleam-version: '0.16'
- gleam-version: '0.23.0-rc1'
otp-version: '24'
rebar3-version: '3.16'
os: 'windows-latest'
Expand Down Expand Up @@ -82,11 +82,6 @@ jobs:
cd test-projects/erlang_rebar3
rebar3 ct
if: ${{matrix.combo.rebar3-version}}
- name: Run Gleam/rebar3 project tests
run: |
cd test-projects/gleam_rebar3
rebar3 eunit
if: ${{matrix.combo.gleam-version}}
environment_variables:
name: Environment variables
runs-on: ${{matrix.combo.os}}
Expand All @@ -96,7 +91,7 @@ jobs:
combo:
- otp-version: '24'
elixir-version: 'v1.12'
gleam-version: '0.19'
gleam-version: '0.23.0-rc1'
rebar3-version: 'nightly'
os: 'windows-latest'
steps:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -165,7 +165,7 @@ jobs:
- uses: erlef/setup-beam@v1
with:
otp-version: '24'
gleam-version: '0.19.0-rc3'
gleam-version: '0.23.0-rc1'
- run: gleam test
```

Expand All @@ -183,7 +183,7 @@ jobs:
- uses: erlef/setup-beam@v1
with:
otp-version: false
gleam-version: '0.19.0-rc3'
gleam-version: '0.23.0-rc1'
- run: gleam check
```

Expand Down
2 changes: 1 addition & 1 deletion dist/install-gleam.ps1
Expand Up @@ -4,7 +4,7 @@ $ErrorActionPreference="Stop"

Set-Location ${Env:RUNNER_TEMP}

$FILE_INPUT="gleam-${VSN}-windows-64bit.zip"
$FILE_INPUT="gleam-${VSN}-x86_64-pc-windows-msvc.zip"
$FILE_OUTPUT="gleam.zip"
$DIR_FOR_BIN=".setup-beam/gleam"

Expand Down
2 changes: 1 addition & 1 deletion dist/install-gleam.sh
Expand Up @@ -5,7 +5,7 @@ set -eo pipefail
cd "${RUNNER_TEMP}"

VSN=${1}
FILE_INPUT=gleam-${VSN}-linux-amd64.tar.gz
FILE_INPUT=gleam-${VSN}-x86_64-unknown-linux-musl.tar.gz
FILE_OUTPUT=gleam.tar.gz
DIR_FOR_BIN=.setup-beam/gleam

Expand Down
2 changes: 1 addition & 1 deletion src/install-gleam.ps1
Expand Up @@ -4,7 +4,7 @@ $ErrorActionPreference="Stop"

Set-Location ${Env:RUNNER_TEMP}

$FILE_INPUT="gleam-${VSN}-windows-64bit.zip"
$FILE_INPUT="gleam-${VSN}-x86_64-pc-windows-msvc.zip"
$FILE_OUTPUT="gleam.zip"
$DIR_FOR_BIN=".setup-beam/gleam"

Expand Down
2 changes: 1 addition & 1 deletion src/install-gleam.sh
Expand Up @@ -5,7 +5,7 @@ set -eo pipefail
cd "${RUNNER_TEMP}"

VSN=${1}
FILE_INPUT=gleam-${VSN}-linux-amd64.tar.gz
FILE_INPUT=gleam-${VSN}-x86_64-unknown-linux-musl.tar.gz
FILE_OUTPUT=gleam.tar.gz
DIR_FOR_BIN=.setup-beam/gleam

Expand Down
2 changes: 1 addition & 1 deletion test-projects/gleam_gleam/.github/workflows/test.yml
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: erlef/setup-beam@v1.9.0
with:
otp-version: "23.2"
gleam-version: "0.19.0-rc3"
gleam-version: "0.23.0-rc1"
- run: gleam format --check src test
- run: gleam deps download
- run: gleam test
4 changes: 2 additions & 2 deletions test-projects/gleam_gleam/manifest.toml
Expand Up @@ -2,8 +2,8 @@
# You typically do not need to edit this file

packages = [
{ name = "gleam_stdlib", version = "0.19.2", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "FFA79EA12369F122B68885E694E097D6810402A2F86BFF48AAE9E40ACE654F4C" },
{ name = "gleeunit", version = "0.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "77701A5E5A565727E1EEAC9196FB878D544049B6331CD0305B5A69699135EA1C" },
{ name = "gleam_stdlib", version = "0.22.3", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "F2C2D389B06426E1289D5419F89BDE8E0F7F35A40B2BBB3C88188481F0D44A9F" },
{ name = "gleeunit", version = "0.6.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "A006864621DB80C4FBB0746580703502FD81A4D38D23FCB20A8120984D353DF0" },
]

[requirements]
Expand Down
23 changes: 0 additions & 23 deletions test-projects/gleam_rebar3/.github/workflows/test.yml

This file was deleted.

21 changes: 0 additions & 21 deletions test-projects/gleam_rebar3/.gitignore

This file was deleted.

24 changes: 0 additions & 24 deletions test-projects/gleam_rebar3/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions test-projects/gleam_rebar3/gleam.toml

This file was deleted.

12 changes: 0 additions & 12 deletions test-projects/gleam_rebar3/rebar.config

This file was deleted.

15 changes: 0 additions & 15 deletions test-projects/gleam_rebar3/src/gleam_rebar3.app.src

This file was deleted.

3 changes: 0 additions & 3 deletions test-projects/gleam_rebar3/src/gleam_rebar3.gleam

This file was deleted.

7 changes: 0 additions & 7 deletions test-projects/gleam_rebar3/test/gleam_rebar3_test.gleam

This file was deleted.

0 comments on commit d36a391

Please sign in to comment.