Skip to content

Commit

Permalink
Add github action for GNU/Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
LudovicRousseau committed Dec 25, 2020
1 parent 2c812f6 commit a17684d
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: GNU/Linux Build

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run
# sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job
# can access it
- uses: actions/checkout@v2

- name: setup prerequisites (linux)
shell: bash
run: sudo apt install swig softhsm2 python3-all-dev python3-setuptools

- name: compile
shell: bash
run: PYTHON=python3 make

- name: test prep
shell: bash
run: |
pip3 install -r dev-requirements.txt
pip3 install .
- name: test prep softhsm
shell: bash
run: |
sudo chmod -R a+rx /etc/softhsm
sudo chmod a+r /etc/softhsm/softhsm2.conf
sudo chown -R $(whoami) /var/lib/softhsm
mkdir /var/lib/softhsm/tokens
softhsm2-util --init-token --slot 0 --label "A token" --pin 1234 --so-pin 123456
- name: test run
shell: bash
run: |
PYTHON=python3 make tests

0 comments on commit a17684d

Please sign in to comment.