-
Notifications
You must be signed in to change notification settings - Fork 96
Migrate CI to github actions [INFRA-351] #905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
11e817d
18f4a40
910c9b8
3b99ba9
82a880a
0772660
7b64d93
de1438d
ae82d3a
6bb6645
2c2cdf8
dac8228
0606638
6642150
e1f398a
7110807
53531f6
3996fbe
5a064af
3196d07
63e8ce6
541743f
015418d
561534c
16e293f
5f0a446
683b3c5
2ceaced
5b97516
3c6cbd9
1c2f71b
755c37c
9f7b708
d0ecf82
b4585e0
fc08783
7fda80d
af8f6ad
f5b3452
9f1372d
70423fd
8d492b2
5e361cf
5ca0396
779d7aa
b94965e
45caa6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Cancel old jobs | ||
on: pull_request | ||
jobs: | ||
cancel: | ||
name: auto-cancellation-running-action | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: fauguste/[email protected] | ||
with: | ||
githubToken: ${{ secrets.GITHUB_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Benchmarks | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "*" | ||
pull_request: | ||
paths: | ||
- "python/**" | ||
- "haskell/**" | ||
- "rust/**" | ||
- scripts/ci_benchmark.bash | ||
- scripts/ci_benchmark_install.bash | ||
- .github/workflows/benchmark.yaml | ||
jobs: | ||
benchmark: | ||
name: Benchmark | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup | ||
run: ./scripts/ci_prepare_python.bash | ||
|
||
- name: Run benchmarks | ||
run: | | ||
source ./scripts/ci_benchmark_install.bash | ||
./scripts/ci_benchmark.bash | ||
env: | ||
VIA_DOCKER: y |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: C | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "*" | ||
pull_request: | ||
paths: | ||
- "c/**" | ||
- .github/workflows/c.yaml | ||
jobs: | ||
coverage: | ||
name: Test | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
|
||
- name: Setup | ||
run: | | ||
sudo apt-get -qq update | ||
sudo apt-get -qq install lcov | ||
|
||
- name: Run tests | ||
run: make test-c | ||
env: | ||
CMAKEFLAGS: -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug | ||
|
||
- name: Upload coverage to codecov.io | ||
run: | | ||
bash <(curl -s https://codecov.io/bash) -s c/build || echo "Codecov did not collect coverage reports"; | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Haskell | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "*" | ||
pull_request: | ||
paths: | ||
- "haskell/**" | ||
jayvdb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- .github/workflows/haskell.yaml | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: haskell/actions/setup@v1 | ||
with: | ||
enable-stack: true | ||
|
||
- name: Build binaries | ||
id: build | ||
working-directory: ./haskell | ||
run: | | ||
VERSION="$(git describe --always --tags --dirty)" | ||
BUILD_TRIPLET="$(cc -dumpmachine)" | ||
ARTIFACT_NAME="sbp_tools_haskell-${VERSION}-${BUILD_TRIPLET}.zip" | ||
|
||
mkdir ./bins | ||
stack install --local-bin-path ./bins | ||
cd ./bins | ||
zip ../$ARTIFACT_NAME \ | ||
sbp2json \ | ||
sbp2prettyjson \ | ||
sbp2yaml \ | ||
json2sbp \ | ||
json2json \ | ||
sbp2nmea | ||
echo "::set-output name=artifact_name::$ARTIFACT_NAME" | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ steps.build.outputs.artifact_name }} | ||
path: ./haskell/${{ steps.build.outputs.artifact_name }} | ||
|
||
publish: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
needs: [build] | ||
name: Publish github release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
path: artifacts | ||
|
||
- name: Upload Release | ||
uses: svenstaro/upload-release-action@v1-release | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: "artifacts/*/*.zip" | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Java | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "*" | ||
pull_request: | ||
paths: | ||
- "java/**" | ||
- .github/workflows/java.yaml | ||
jobs: | ||
coverage: | ||
name: Test | ||
runs-on: ubuntu-18.04 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there are three jvms on https://github.com/actions/virtual-environments/blob/ubuntu18/20210309.1/images/linux/Ubuntu1804-README.md . It would be useful to print the JVM version that is being used for these tests. (Under Travis, the version was explicitly being set to 1.8.0) |
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run tests | ||
run: make test-java |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: JavaScript | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "*" | ||
pull_request: | ||
paths: | ||
- "javascript/**" | ||
notoriaga marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- package.json | ||
- package-lock.json | ||
- .github/workflows/javascript.yaml | ||
jobs: | ||
coverage: | ||
name: Test | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: make test-javascript | ||
jayvdb marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Python | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "*" | ||
pull_request: | ||
paths: | ||
- "python/**" | ||
notoriaga marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- requirements.txt | ||
- tox.ini | ||
- scripts/ci_prepare_python.bash | ||
- .github/workflows/python.yaml | ||
jobs: | ||
coverage: | ||
name: Test | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup | ||
run: ./scripts/ci_prepare_python.bash | ||
|
||
- name: Run tests | ||
run: make test-python |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Rust | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "*" | ||
pull_request: | ||
paths: | ||
- "rust/**" | ||
notoriaga marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Cargo.toml | ||
- Cargo.lock | ||
- scripts/ci_prepare_rust.bash | ||
- scripts/ci_build_rust.bash | ||
- .github/workflows/rust.yaml | ||
jobs: | ||
lint: | ||
name: Format and lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- run: ./scripts/ci_prepare_rust.bash | ||
shell: bash | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: rustfmt | ||
|
||
- uses: actions-rs/cargo@v1 | ||
name: Format Check | ||
with: | ||
command: fmt | ||
args: -- --check | ||
|
||
test: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- run: ./scripts/ci_prepare_rust.bash | ||
shell: bash | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Run tests | ||
run: make test-rust | ||
|
||
build: | ||
name: Build binaries | ||
needs: [lint, test] | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-18.04 | ||
- macos-10.15 | ||
- windows-2016 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- run: ./scripts/ci_prepare_rust.bash | ||
shell: bash | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Build ${{ matrix.os }} binaries | ||
id: build | ||
run: ./scripts/ci_build_rust.bash | ||
shell: bash | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ steps.build.outputs.artifact_name }} | ||
path: ${{ steps.build.outputs.artifact_name }} | ||
|
||
publish: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
needs: [build] | ||
name: Publish github release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
path: artifacts | ||
|
||
- name: Upload Release | ||
uses: svenstaro/upload-release-action@v1-release | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: "artifacts/*/*.zip" | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, the bash codecov usually doesnt set an exit status, so the
|| ..
here is useless.This upload isnt working; see https://github.com/swift-nav/libsbp/runs/2124966802#step:5:530
It seems codecov hasnt been working for a while in this repo, so perhaps that could be another task to get them all working in github actions after this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems codecov<->github-integration isnt enabled for this repo. It is possible to send reports without that integration being enabled.