diff options
author | Loïc Hoguin <[email protected]> | 2024-11-25 11:13:06 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2024-11-25 11:13:06 +0100 |
commit | 79413746470f1ea112ac57ed189e39e71ac22cdd (patch) | |
tree | 2cbdbd691d09e9705ee2604be77b14d2b312f789 | |
parent | a6f9a450af99a7a95848dde671de658bb53a43dc (diff) | |
download | erlang.mk-79413746470f1ea112ac57ed189e39e71ac22cdd.tar.gz erlang.mk-79413746470f1ea112ac57ed189e39e71ac22cdd.tar.bz2 erlang.mk-79413746470f1ea112ac57ed189e39e71ac22cdd.zip |
Check templates independently from tests
-rw-r--r-- | .github/workflows/ci.yaml | 23 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | test/Makefile | 15 |
3 files changed, 39 insertions, 2 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8ee4a94..c53f39a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -70,7 +70,6 @@ jobs: - os: windows-latest suite: concuerror runs-on: ${{ matrix.os }} - steps: - name: Checkout repository @@ -125,7 +124,6 @@ jobs: # - windows-latest extra: ['', 'LEGACY=1'] runs-on: ${{ matrix.os }} - steps: - name: Checkout repository @@ -167,3 +165,24 @@ jobs: name: ${{ matrix.os }} OTP-${{ matrix.erlang }} packages ${{ matrix.extra }} path: | test/packages/ + + templates: + strategy: + fail-fast: false + matrix: + erlang: + - '27' + runs-on: ubuntu-latest + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Erlang/OTP + uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.erlang }} + version-type: loose + + - name: Check templates + run: make check-templates @@ -86,6 +86,9 @@ summary: @sort test/packages/errors.log > test/logs/latest.log @cp test/logs/latest.log "test/logs/$(shell date '+%F_%T%z')" +check-templates: + $(MAKE) -C test templates + search: @$(MAKE) --no-print-directory \ -f core/core.mk $(addprefix -f,$(wildcard index/*.mk)) -f core/index.mk \ diff --git a/test/Makefile b/test/Makefile index 5240115..78603aa 100644 --- a/test/Makefile +++ b/test/Makefile @@ -406,3 +406,18 @@ $(foreach pkg,$(shell grep -v '^#' hexpm_packages.txt | sed 's/ /@/'),$(eval $(c hexpm-packages: $(addprefix hexpm-pkg-,$(HEXPM_PACKAGES)) endif + +# Templates. +# +# apps_Makefile, top_Makefile and vm.args are not currently tested here. + +templates: clean + $i "Compile Erlang modules" + $t mkdir test_templates/ + $t cd test_templates/ && erlc +no_error_module_mismatch ../../templates/*.erl + + $i "Load Erlang term files" + $t $(ERL) -eval '{ok, _} = file:consult("../templates/application.app.src"), halt()' + $t $(ERL) -eval '{ok, _} = file:consult("../templates/library.app.src"), halt()' + $t $(ERL) -eval '{ok, _} = file:consult("../templates/relx.config"), halt()' + $t $(ERL) -eval '{ok, _} = file:consult("../templates/sys.config"), halt()' |