Skip to content
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

Move test to github actions. #288

Merged
merged 8 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 0 additions & 81 deletions .cirrus.yml

This file was deleted.

79 changes: 79 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Tests
godofredoc marked this conversation as resolved.
Show resolved Hide resolved
on:
push:
branches:
- main
pull_request:

# Declare default permissions as read only.
permissions: read-all

jobs:
test_linux:
runs-on: ubuntu-latest
strategy:
fail-fast: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the opposite of "fail-fast"? (and what's the default?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is True. The opposite is continue_on_error which will continue running all the shards even if one of them fails. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the default is true, should be omit this line? having a line that sets the value to the default is generally misleading (people will assume it's doing something intentional)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I'll send a fix!

matrix:
include:
- name: tests-linux-0
shards: 3
shard-index: 0
- name: tests-linux-1
shards: 3
shard-index: 1
- name: tests-linux-2
shards: 3
shard-index: 2
godofredoc marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: ${{ matrix.name }}
run: scripts/verify_tests_on_master.sh --shards ${{ matrix.shards }} --shard-index ${{ matrix.shard-index }}
skp_generator:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: skp_generator
run: (cd skp_generator && ./build.sh)
test_windows:
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
include:
- name: tests-windows-0
shards: 5
shard-index: 0
- name: tests-windows-1
shards: 5
shard-index: 1
- name: tests-windows-2
shards: 5
shard-index: 2
- name: tests-windows-3
shards: 5
shard-index: 3
- name: tests-windows-4
shards: 5
shard-index: 4
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: ${{ matrix.name }}
run: scripts\verify_tests_on_master.bat --shards ${{ matrix.shards }} --shard-index ${{ matrix.shard-index }}
test_mac:
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
include:
- name: tests-macos-0
shards: 2
shard-index: 0
- name: tests-macos-1
shards: 2
shard-index: 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i worry that this method of sharding is going to mean we end up missing shards one day and not noticing (like if someone just increases the "shards" number but doesn't add a new "shard-index" line). Is there any way to guarantee that all the shards are present?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a quick look to the docs I didn't find anything that could be used to calculate indexes programmatically before actions read the file and triggers the builds.

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: ${{ matrix.name }}
run: scripts/verify_tests_on_master.sh --shards ${{ matrix.shards }} --shard-index ${{ matrix.shard-index }}