forked from LudovicRousseau/PyKCS11
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c812f6
commit a17684d
Showing
1 changed file
with
50 additions
and
0 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 |
---|---|---|
@@ -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 |