-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove `app` file and allow specifying a different REBAR executable so we can test both rebar2 and rebar3. Since OTP team provides docker images we can use those for CI. They seem to be a bit more recent than ESL packages and also provide `rebar` and `rebar3` commands.
- Loading branch information
Showing
2 changed files
with
19 additions
and
37 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 |
---|---|---|
|
@@ -5,34 +5,24 @@ on: | |
pull_request: | ||
jobs: | ||
test: | ||
name: test | ||
name: test ${{matrix.otp_vsn}} on ${{matrix.os}} | ||
runs-on: ${{matrix.os}} | ||
container: | ||
image: erlang:${{matrix.otp_vsn}} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
otp: | ||
- "24.3.3" | ||
- "23.3.4.5" | ||
- "22.3.4.9" | ||
- "21.3.8.17" | ||
- "24.3.4.0" | ||
- "23.3.4.14" | ||
- "22.3.4.26" | ||
- "21.3.8.24" | ||
- "20.3.8.26" | ||
include: | ||
- os: ubuntu-18.04 | ||
otp: "19.3.6.13" | ||
- os: ubuntu-18.04 | ||
otp: "18.3.4.11" | ||
- "19.3.6.13" | ||
- "18.3.4.11" | ||
steps: | ||
- uses: actions/[email protected] | ||
- run: | | ||
VERSION=${{matrix.otp}} | ||
RELEASE=$(lsb_release -cs) | ||
DIR=$(mktemp -d) | ||
pushd $DIR | ||
FILE=esl-erlang_$VERSION-1~ubuntu~$RELEASE\_amd64.deb | ||
wget https://packages.erlang-solutions.com/erlang/debian/pool/$FILE | ||
sudo dpkg -i $FILE | ||
popd | ||
rm -r $DIR | ||
- run: make test | ||
- run: REBAR=rebar make test |
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 |
---|---|---|
@@ -1,24 +1,16 @@ | ||
PREFIX:=../ | ||
DEST:=$(PREFIX)$(PROJECT) | ||
REBAR?=rebar3 | ||
|
||
REBAR=./rebar | ||
.PHONY: all edoc test clean | ||
|
||
.PHONY: all edoc test clean build_plt dialyzer app | ||
build: | ||
@$(REBAR) get-deps # rebar2 compatibility, it's no-op on rebar3 | ||
@$(REBAR) compile | ||
|
||
all: | ||
@$(REBAR) prepare-deps | ||
|
||
edoc: all | ||
@$(REBAR) doc | ||
|
||
test: | ||
@rm -rf .eunit | ||
@mkdir -p .eunit | ||
test: build | ||
@$(REBAR) eunit | ||
|
||
edoc: build | ||
@$(REBAR) edoc | ||
|
||
clean: | ||
@$(REBAR) clean | ||
|
||
app: | ||
@[ -z "$(PROJECT)" ] && echo "ERROR: required variable PROJECT missing" 1>&2 && exit 1 || true | ||
@$(REBAR) -r create template=mochiwebapp dest=$(DEST) appid=$(PROJECT) |