Skip to content

Commit

Permalink
Feature/add tests on archlinux (#16)
Browse files Browse the repository at this point in the history
* wip

* wip

* update-name

* update-name

* wip
  • Loading branch information
admiswalker authored Aug 16, 2024
1 parent b8d7368 commit c5de2af
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main_tests_on_alpine.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests on Alpine
name: Alpine Env

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [ main, dev, develop ]

jobs:
build:
Build-and-Test:
runs-on: ubuntu-24.04
container:
image: crystallang/crystal:latest-alpine
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/main_tests_on_archlinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Archlinux Env

on:
push:
branches: [ main, dev, develop ]
pull_request:
branches: [ main, dev, develop ]

jobs:
Build-and-Test:
runs-on: ubuntu-24.04
container:
image: archlinux
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: Install build tools
run: |
pacman -Syy
pacman -S --noconfirm coreutils make gcc cmake time
pacman -S --noconfirm python-numpy python-matplotlib
- name: Build googletest
run: |
make ./googletest-master/build/lib/libgtest.a
- name: Build SSTD
run: |
make FORCE_TO_MAKE_SSTD
- name: Build SSTD TESTS
run: |
make FORCE_TO_MAKE_TEST_EXE
- name: Build the others
run: |
make
- name: Run tests
run: |
./exe
4 changes: 2 additions & 2 deletions .github/workflows/main_tests_on_debian.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests on Debian
name: Debian Env

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [ main, dev, develop ]

jobs:
build:
Build-and-Test:
runs-on: ubuntu-24.04
container:
image: debian:12
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main_tests_on_raspberry_pi_os_arm64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests on Raspberry Pi OS (Arm64)
name: Raspberry Pi OS (Arm64) Evn

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [ main, dev, develop ]

jobs:
build:
Build-and-Test:
runs-on: ubuntu-24.04

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main_tests_on_ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests on Ubuntu
name: Ubuntu Env

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [ main, dev, develop ]

jobs:
build:
Build-and-Test:
runs-on: ubuntu-24.04
steps:
- name: checkout repository
Expand Down
11 changes: 11 additions & 0 deletions docker/archlinux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM archlinux

RUN pacman -Syy
RUN pacman -S --noconfirm \
coreutils \
make \
gcc \
cmake \
python-numpy \
python-matplotlib \
time
4 changes: 4 additions & 0 deletions docker/archlinux/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
SCRIPT_DIR=`cd $(dirname ${BASH_SOURCE:-$0}); pwd`
docker build -t sstd_archlinux $SCRIPT_DIR

4 changes: 4 additions & 0 deletions docker/archlinux/rm_docker_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
IMAGE_ID=$(docker images | grep 'sstd_archlinux' | awk '{print $3}')
echo $IMAGE_ID
docker rmi ${IMAGE_ID}
12 changes: 12 additions & 0 deletions docker/archlinux/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
docker run \
-u `id -u`:`id -g` \
-v /etc/group:/etc/group:ro \
-v /etc/passwd:/etc/passwd:ro \
-v /etc/shadow:/etc/shadow:ro \
-v /etc/sudoers.d:/etc/sudoers.d:ro \
--rm -it --name sstd_fedora \
-v $PWD:/home -w /home \
sstd_archlinux:latest /bin/bash

# --user root \

0 comments on commit c5de2af

Please sign in to comment.