Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github: add initial github action for CI
Goal is to switch current builder run internally by Google over to GitHub Actions.
- Loading branch information
1 parent
5410759
commit 5b3aa87
Showing
2 changed files
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,35 @@ | ||
on: [push, pull_request] | ||
name: Test | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
go-version: [1.16.x, 1.17.x] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install libtspi | ||
run: sudo apt-get install -y libtspi-dev | ||
- name: Test | ||
run: go test ./... | ||
test-tpm-12: | ||
strategy: | ||
matrix: | ||
go-version: [1.16.x, 1.17.x] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install libtspi | ||
run: sudo apt-get install -y libtspi-dev | ||
- name: Test | ||
run: ./ci/run.sh |
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,15 @@ | ||
#!/bin/bash -e | ||
|
||
export PROJECT_ROOT="$( pwd )" | ||
TMPDIR="$( mktemp -d )" | ||
SIM_DIR="${TMPDIR}/tpm12_sim" | ||
|
||
TEST_ROOT="${TMPDIR}/tests_base" | ||
|
||
mkdir -pv "${SIM_DIR}" | ||
./ci/setup_tpm12_simulator.sh "${SIM_DIR}" | ||
./ci/setup_tests_fs.sh "${TEST_ROOT}" | ||
|
||
go test -v ./... -- --testTPM12 | ||
|
||
./ci/shutdown_tpm12_simulator.sh "${SIM_DIR}" |