-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GH Actions CI and fix tests on Erlang 27
Add CI for Windows, MacOS and Ubuntu Linux. For Linux, test both rebar2 and rebar3. Apparently due to `string:split/2` in `rebar.config.script` jiffy wasn't compatible with Erlang <20 for quite a now, and we didn't see any complaints, so make Erlang 20 the minimum supported version. Old jiffy releases are still available for anyone who needs them. In addition, only Erlang OTP docker images 20+ work with the latest (v4) checkout CI action, so that's another reason to make that the new cutoff. On Erlang 27 needed to make a few test updates: * The referenced binary length size computation changed so make sure to make the binaries large enough to avoid triggering the inconsistencies between <27 and 27+ version and needing to do an ifdef of some sort. * In Erlang 27 -0.0 =/= 0.0 so updated a few tests expecting exact comparison, to use numeric equality `=`. Jiffy doesn't round-trip -0.0s anyway, so it's only a test-side discrepancy.
- Loading branch information
Showing
14 changed files
with
98 additions
and
92 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,86 @@ | ||
name: ci | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
linux: | ||
name: ${{matrix.os}}-${{matrix.otp_version}}-${{matrix.rebar}} | ||
runs-on: ${{matrix.os}} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
otp_version: [20,23,26,27] | ||
os: [ubuntu-latest] | ||
rebar: [rebar, rebar3] | ||
|
||
container: | ||
image: erlang:${{matrix.otp_version}} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: ${{matrix.rebar}} make check | ||
run: | | ||
make REBAR=${{matrix.rebar}} check | ||
macos: | ||
name: macos | ||
runs-on: ${{matrix.os}} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-12, macos-14] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: install erlang | ||
run: | | ||
brew install erlang | ||
- name: install rebar3 | ||
run: | | ||
brew install rebar3 | ||
- name: make check | ||
run: | | ||
make check | ||
windows: | ||
name: windows | ||
runs-on: ${{matrix.os}} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-2019, windows-2022] | ||
|
||
steps: | ||
- name: prevent git from messing up our json test files | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- uses: actions/checkout@v4 | ||
- name: install erlang | ||
run: | | ||
choco install erlang | ||
- name: install rebar3 | ||
run: | | ||
choco install rebar3 | ||
- name: make check | ||
run: | | ||
$path = vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -nologo -nocolor -property installationPath | ||
if ($path) { | ||
$path = join-path $path '\VC\Auxiliary\Build\vcvars64.bat' | ||
if (test-path $path) { | ||
cmd /s /c """$path"" $args && set" | where { $_ -match '(\w+)=(.*)' } | foreach { | ||
$null = new-item -force -path "Env:\$($Matches[1])" -value $Matches[2] | ||
} | ||
} | ||
} | ||
make check |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
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
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
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