Merge branch 'ei' into develop
This commit is contained in:
commit
cca911b1b7
8 changed files with 139 additions and 9 deletions
17
.builds/alpine.yaml
Normal file
17
.builds/alpine.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
image: alpine/latest
|
||||
packages:
|
||||
- elixir
|
||||
- file-dev
|
||||
sources:
|
||||
- https://git.sr.ht/~href/gen_magic
|
||||
tasks:
|
||||
- setup: |
|
||||
mix local.hex --force
|
||||
- build: |
|
||||
cd gen_magic
|
||||
mix deps.get
|
||||
MIX_ENV=test mix compile
|
||||
- test: |
|
||||
cd gen_magic
|
||||
mix test
|
||||
|
17
.builds/archlinux.yaml
Normal file
17
.builds/archlinux.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
image: archlinux
|
||||
packages:
|
||||
- elixir
|
||||
- file
|
||||
sources:
|
||||
- https://git.sr.ht/~href/gen_magic
|
||||
tasks:
|
||||
- setup: |
|
||||
mix local.hex --force
|
||||
- build: |
|
||||
cd gen_magic
|
||||
mix deps.get
|
||||
MIX_ENV=test mix compile
|
||||
- test: |
|
||||
cd gen_magic
|
||||
mix test
|
||||
|
20
.builds/debian-oldstable.yaml
Normal file
20
.builds/debian-oldstable.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
image: debian/oldstable
|
||||
packages:
|
||||
- build-essential
|
||||
- erlang
|
||||
- erlang-dev
|
||||
- elixir
|
||||
- libmagic-dev
|
||||
sources:
|
||||
- https://git.sr.ht/~href/gen_magic
|
||||
tasks:
|
||||
- setup: |
|
||||
mix local.hex --force
|
||||
- build: |
|
||||
cd gen_magic
|
||||
mix deps.get
|
||||
MIX_ENV=test mix compile
|
||||
- test: |
|
||||
cd gen_magic
|
||||
mix test
|
||||
|
20
.builds/debian-stable.yaml
Normal file
20
.builds/debian-stable.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
image: debian/stable
|
||||
packages:
|
||||
- build-essential
|
||||
- erlang
|
||||
- erlang-dev
|
||||
- elixir
|
||||
- libmagic-dev
|
||||
sources:
|
||||
- https://git.sr.ht/~href/gen_magic
|
||||
tasks:
|
||||
- setup: |
|
||||
mix local.hex --force
|
||||
- build: |
|
||||
cd gen_magic
|
||||
mix deps.get
|
||||
MIX_ENV=test mix compile
|
||||
- test: |
|
||||
cd gen_magic
|
||||
mix test
|
||||
|
20
.builds/debian-testing.yaml
Normal file
20
.builds/debian-testing.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
image: debian/testing
|
||||
packages:
|
||||
- build-essential
|
||||
- erlang
|
||||
- erlang-dev
|
||||
- elixir
|
||||
- libmagic-dev
|
||||
sources:
|
||||
- https://git.sr.ht/~hrefhref/gen_magic
|
||||
tasks:
|
||||
- setup: |
|
||||
mix local.hex --force
|
||||
- build: |
|
||||
cd gen_magic
|
||||
mix deps.get
|
||||
MIX_ENV=test mix compile
|
||||
- test: |
|
||||
cd gen_magic
|
||||
mix test
|
||||
|
22
.builds/fedora-latest.yaml
Normal file
22
.builds/fedora-latest.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
image: fedora/latest
|
||||
packages:
|
||||
- make
|
||||
- gcc
|
||||
- kernel-devel
|
||||
- erlang
|
||||
- elixir
|
||||
- file-devel
|
||||
sources:
|
||||
- https://git.sr.ht/~href/gen_magic
|
||||
tasks:
|
||||
- setup: |
|
||||
sudo dnf -y group install 'Development Tools'
|
||||
mix local.hex --force
|
||||
- build: |
|
||||
cd gen_magic
|
||||
mix deps.get
|
||||
MIX_ENV=test mix compile
|
||||
- test: |
|
||||
cd gen_magic
|
||||
mix test
|
||||
|
17
.builds/freebsd.yaml
Normal file
17
.builds/freebsd.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
image: freebsd/latest
|
||||
packages:
|
||||
- elixir
|
||||
- gmake
|
||||
sources:
|
||||
- https://git.sr.ht/~href/gen_magic
|
||||
tasks:
|
||||
- setup: |
|
||||
mix local.hex --force
|
||||
- build: |
|
||||
cd gen_magic
|
||||
mix deps.get
|
||||
MIX_ENV=test mix compile
|
||||
- test: |
|
||||
cd gen_magic
|
||||
mix test
|
||||
|
15
Makefile
15
Makefile
|
@ -13,20 +13,17 @@ RM = rm -Rf
|
|||
# Unit test custom magic file
|
||||
|
||||
MAGIC = file
|
||||
TEST_DIRECTORY = test
|
||||
TARGET_MAGIC = $(TEST_DIRECTORY)/elixir.mgc
|
||||
SOURCE_MAGIC = $(TEST_DIRECTORY)/elixir
|
||||
|
||||
all: priv/apprentice test/elixir.mgc
|
||||
|
||||
test/%.mgc: test/%
|
||||
cd test; file -C -m ../$^
|
||||
|
||||
priv/apprentice: src/apprentice.c
|
||||
mkdir -p priv
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
||||
|
||||
# Test case
|
||||
|
||||
$(TARGET_MAGIC): $(SOURCE_MAGIC)
|
||||
cd $(TEST_DIRECTORY); $(MAGIC) -C -m elixir
|
||||
|
||||
clean:
|
||||
$(RM) $(PRIV) $(BEAM_FILES)
|
||||
$(RM) $(PRIV) $(BEAM_FILES) test/*.mgc
|
||||
|
||||
.PHONY: clean
|
||||
|
|
Loading…
Reference in a new issue