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

Migrate CI to GitHub Actions #102

Merged
merged 61 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
3cd8bf8
Remove Travis CI configuration
LinqLover Mar 16, 2021
84aa3a7
Add GitHub workflow configuration
LinqLover Mar 16, 2021
5b99227
Fix syntax error (1)
LinqLover Mar 16, 2021
b484dcc
Fix syntax error (2)
LinqLover Mar 16, 2021
10b5984
Fix syntax error (3)
LinqLover Mar 16, 2021
a4280ed
Fix syntax error (4)
LinqLover Mar 16, 2021
6125688
Fix syntax error (5)
LinqLover Mar 16, 2021
34232ea
Don't use env vars in job declarations at the moment
LinqLover Mar 16, 2021
b5b40ca
Complements 34232ea
LinqLover Mar 16, 2021
193ac51
Fix syntax error (6)
LinqLover Mar 16, 2021
d7183fb
Fix syntax error (6)
LinqLover Mar 16, 2021
3ca6297
Fix syntax error (7)
LinqLover Mar 16, 2021
e13a14d
Instead of passing latex jobname, rename PDF file after compilation
LinqLover Mar 16, 2021
f9d95bc
Fix smalltalk-version for setup-smalltalkCI
LinqLover Mar 16, 2021
1581233
Move SBEScriptBuilderTest into separate SBE-Tests
LinqLover Mar 16, 2021
c4b3087
Split up .smalltalk.ston files
LinqLover Mar 16, 2021
d091a80
Move .smalltalk.ston files
LinqLover Mar 16, 2021
975ff78
Use relative path in .smalltalk.ston files
LinqLover Mar 16, 2021
07204e8
Add SBE-Tests package to baseline
LinqLover Mar 16, 2021
4c8f123
Fix syntax error (8)
LinqLover Mar 16, 2021
0d5597b
Disable trunk builds for testing
LinqLover Mar 16, 2021
c1f8193
Merge branch 'github-actions' of github.com:hpi-swa-lab/SqueakByExamp…
LinqLover Mar 16, 2021
3d7a25f
Rearrange .smalltalk.ston files and build_scripts
LinqLover Mar 16, 2021
10cd3b7
Complements 3d7a25fda13dc0912a2a8c544739cea6a33ea914
LinqLover Mar 16, 2021
b7bb137
Add support for GitHub actions in SBEScriptBuilder class >> #resource…
LinqLover Mar 16, 2021
ecac15a
Fix download-artifact path for listings
LinqLover Mar 17, 2021
a44590b
Add support for DEBUG_FIGURES
LinqLover Mar 17, 2021
af435fd
Merge branch 'github-actions' of github.com:hpi-swa-lab/SqueakByExamp…
LinqLover Mar 17, 2021
6b84567
Use existing pseudo tex file
LinqLover Mar 17, 2021
5e32bc6
Name remaining steps
LinqLover Mar 17, 2021
d995be0
Use texlive-action instead of latex-action
LinqLover Mar 17, 2021
819731e
Specify missing SQUEAKVERSION for make target
LinqLover Mar 17, 2021
81317c6
Debug escape sequences
LinqLover Mar 17, 2021
682e1c7
Debug escape sequences (2)
LinqLover Mar 17, 2021
d3e954b
Fix bash --version
LinqLover Mar 17, 2021
fff485f
Support bash v5 escaping
LinqLover Mar 17, 2021
b89d5d1
Don't use fancy bash expansion syntax for "rename PDF"
LinqLover Mar 17, 2021
fd9fa6e
Remove debugging artifacts and document magic
LinqLover Mar 17, 2021
44459b6
Reenable trunk builds
LinqLover Mar 17, 2021
7f73c24
Updates setup-smalltalkCI parameter
LinqLover Mar 17, 2021
6fe8379
Liberalize job dependencies to improve parallelization, union jobs bu…
LinqLover Mar 17, 2021
39dd4f2
Restore load listings step (was removed by accident)
LinqLover Mar 17, 2021
e24bea4
Abbreviate job names
LinqLover Mar 17, 2021
38c0054
Unicode
LinqLover Mar 17, 2021
1559823
Enables coveralls for SBE-Tests
LinqLover Mar 17, 2021
c91b6e9
Fix a slip in "Check DEBUG_FIGURES"
LinqLover Mar 17, 2021
0031cc0
Try to fix notify job
LinqLover Mar 17, 2021
f9b884c
Fix syntax error (9)
LinqLover Mar 17, 2021
093015f
More escaping fixes
LinqLover Mar 17, 2021
e89643d
Fix name of env var
LinqLover Mar 17, 2021
9a90444
Try to fix notify condition
LinqLover Mar 17, 2021
65b74ef
Fix syntax error (10)
LinqLover Mar 17, 2021
7974de4
Debug notifications
LinqLover Mar 17, 2021
ca00158
Fix syntax error (11)
LinqLover Mar 17, 2021
27496e4
Update \imagetest to reflect changes in graphicx package
LinqLover Mar 17, 2021
78dfd54
Switch slack notifications to rtCamp/action-slack-notify
LinqLover Mar 17, 2021
d22e8d6
Beautify slack notifications
LinqLover Mar 17, 2021
24c42e7
Revert "Debug notifications"
LinqLover Mar 17, 2021
6c13bd0
Patch \imagetest again to support \includepdf
LinqLover Mar 18, 2021
6128824
Turn off notifications unless build was scheduled
LinqLover Mar 18, 2021
d505c58
Merge branch 'master' into github-actions
LinqLover Apr 13, 2021
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
130 changes: 130 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: 📕 Make Book

on:
push:
schedule:
- cron: "0 0 * * 1" # every monday

# not yet implemented: https://github.community/t/how-to-set-and-access-a-workflow-variable/17335/6?u=linqlover
# ---
#env:
# os: ubuntu-latest
# fail-fast: false
# smalltalks: "[Trunk, 5.3]"
#---

jobs:
tests:
name: 🐞 Internal tests [${{ matrix.smalltalk }}]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
smalltalk: [Trunk, 5.3]
steps:
- uses: actions/checkout@v2
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: Squeak64-${{ matrix.smalltalk }}
- name: Run SmalltalkSources tests
run: smalltalkci -s Squeak64-${{ matrix.smalltalk }} SBE-Tests.smalltalk.ston
timeout-minutes: 15
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for coverage reports
tex-assertions:
name: 🧪 @TEST assertions [${{ matrix.smalltalk }}]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
smalltalk: [Trunk, 5.3]
steps:
- uses: actions/checkout@v2
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: Squeak64-${{ matrix.smalltalk }}
- name: Run TEX assertions
run: smalltalkci -s Squeak64-${{ matrix.smalltalk }} SBE-Testing.smalltalk.ston
timeout-minutes: 15
listings:
name: 📄 Collect listings from SmalltalkSources
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: make listings
- name: 💾 Store listings
uses: actions/upload-artifact@master
with:
name: listings
path: ListingSources
build:
name: 📖 Build book [${{ matrix.smalltalk }}]
needs: [listings]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
smalltalk: [Trunk, 5.3]
steps:
- uses: actions/checkout@v2
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: Squeak64-${{ matrix.smalltalk }}
- id: figures
name: 🖼 Build Squeak figures
run: smalltalkci -s Squeak64-${{ matrix.smalltalk }} SBE-Extract.smalltalk.ston
timeout-minutes: 15
continue-on-error: true
- if: (steps.figures.outcome == 'failure')
name: Configure DEBUG_FIGURES
run: |
echo ::warning::jobs.figures has failed, compiling PDF with missing figures
echo "DEBUG_FIGURES=true" >> $GITHUB_ENV
- name: Load listings
uses: actions/download-artifact@master
with:
name: listings
path: ListingSources
- name: ⚙ Compile PDF
uses: xu-cheng/texlive-action/full@v1
with:
run: |
apk add make
make book-pages
env:
SQUEAK_VERSION: ${{ matrix.smalltalk }}
BASH_V5: true
- name: Rename PDF
run: mv SBE.pdf SBE-${{ matrix.smalltalk }}.pdf
env:
SQUEAK_VERSION: ${{ matrix.smalltalk }}
- name: 💾 Store book
uses: actions/upload-artifact@master
with:
name: book-${{ matrix.smalltalk }}
path: SBE-${{ matrix.smalltalk }}.pdf
- if: (steps.figures.outcome == 'failure')
name: Check DEBUG_FIGURES
run: |
echo ::error::jobs.figures has failed, so the compiled PDF might miss some figures!
echo "DEBUG_FIGURES=true" >> $GITHUB_ENV
exit 1
notify:
name: 📣 Notify community on failure
needs: [tests, tex-assertions, build]
if: always()
runs-on: ubuntu-latest
steps:
- if: |
github.event_name == 'schedule' && (
needs.tests.result == 'failure'
|| needs.build.result == 'failure'
|| needs.tex-assertions.result == 'failure')
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: "GitHub Actions"
SLACK_COLOR: danger
SLACK_ICON: https://avatars1.githubusercontent.com/u/65916846?v=4
SLACK_TITLE: "Build failed!"
SLACK_MESSAGE: "Oh no, the latest scheduled CI build for SqueakByExample failed! 😱"
3 changes: 2 additions & 1 deletion .squot
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ OrderedDictionary {
'SmalltalkSources\/SBE-Testing.package' : #SquotCypressCodeSerializer,
'SmalltalkSources\/SBE-Extract.package' : #SquotCypressCodeSerializer,
'SmalltalkSources\/BaselineOfSBE.package' : #SquotCypressCodeSerializer,
'SmalltalkSources\/SBE-Monticello.package' : #SquotCypressCodeSerializer
'SmalltalkSources\/SBE-Monticello.package' : #SquotCypressCodeSerializer,
'SmalltalkSources\/SBE-Tests.package' : #SquotCypressCodeSerializer
}
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ endif

BOOK=SBE
ETC=SBE-etc
TEXINPUT=$(shell echo "$$([ "$$DEBUG_FIGURES" = true ] && echo '\\\\AtBeginDocument{\\\\include{robustize-figures}}')$$([ -z "$$SQUEAK_VERSION" ] || echo '\\\\newcommand{\\\\SQUEAKVERSION}{${SQUEAK_VERSION}}')\\\\input{${BOOK}}")
ifdef BASH_V5 # Bash v5 interprets escape characters differently 🙄
TEXINPUT=$(shell echo "$$([ "$$DEBUG_FIGURES" = true ] && echo '\AtBeginDocument{\include{robustize-figures}}')$$([ -z "$$SQUEAK_VERSION" ] || echo '\newcommand{\SQUEAKVERSION}{${SQUEAK_VERSION}}')\\input{${BOOK}}")
else
TEXINPUT=$(shell echo "$$([ "$$DEBUG_FIGURES" = true ] && echo '\\\\AtBeginDocument{\\\\include{robustize-figures}}')$$([ -z "$$SQUEAK_VERSION" ] || echo '\\\\newcommand{\\\\SQUEAKVERSION}{${SQUEAK_VERSION}}')\\\\input{${BOOK}}")
endif

# --------------------------------------------------------------------------------
all : book

# NB: be sure to use texlive and to set the TEXINPUTS variable accordingly
# See README.txt
# See README.md

book: clean listings book-pages

Expand Down
4 changes: 2 additions & 2 deletions .smalltalk.ston → SBE-Extract.smalltalk.ston
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ SmalltalkCISpec {
#useLatestMetacello : true
}
],
#preTesting : 'build_scripts/prepareSuite.st',
#preTesting : 'build_scripts/prepareFiguresSuite.st',
#testing : {
#failOnSCIDeprecationWarnings : false,
#categories : [ 'SBE-Testing', 'SBEGenerated*' ]
#categories : [ 'SBEGenerated-Figures' ]
}
}
16 changes: 16 additions & 0 deletions SBE-Testing.smalltalk.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'SBE',
#directory : 'SmalltalkSources',
#platforms : [ #squeak ],
#load : [ 'ci' ],
#useLatestMetacello : true
}
],
#preTesting : 'build_scripts/prepareTestingSuite.st',
#testing : {
#failOnSCIDeprecationWarnings : false,
#categories : [ 'SBEGenerated-Tests' ]
}
}
18 changes: 18 additions & 0 deletions SBE-Tests.smalltalk.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'SBE',
#directory : 'SmalltalkSources',
#platforms : [ #squeak ],
#load : [ 'ci' ],
#useLatestMetacello : true
}
],
#testing : {
#categories : [ 'SBE-Tests' ],
#coverage : {
#packages : [ 'SBE-Extract' ],
#format : #coveralls
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ baseline: spec
package: #'SBE-Quinto';
package: #'SBE-QuickTour';
package: #'SBE-Streams';
package: #'SBE-Testing'.
package: #'SBE-Testing';
package: #'SBE-Tests'.
spec group: #ci with: #(
#'SBE-Environment'
#'SBE-Extract'
Expand All @@ -22,4 +23,5 @@ baseline: spec
#'SBE-Quinto'
#'SBE-QuickTour'
#'SBE-Streams'
#'SBE-Testing')].
#'SBE-Testing'
#'SBE-Tests')].
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"class" : {
},
"instance" : {
"baseline:" : "ct 9/22/2020 19:18" } }
"baseline:" : "ct 3/16/2021 23:15" } }
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ resourceDirectory

^ ResourceDirectory ifNil: [
| directory |
Smalltalk globals at: #SmalltalkCI
ifPresent: [:sci | (sci perform: #getEnv: with: #TRAVIS_BUILD_DIR)
ifNotNil: [:path | directory := FileSystem disk referenceTo: path]].
(Smalltalk classNamed: #SmalltalkCI) ifNotNil: [:sci | | path |
#(GITHUB_WORKSPACE TRAVIS_BUILD_DIR)
detect: [:key | (path := sci getEnv: key) notNil]
ifNone: [].
path ifNotNil: [
directory := FileSystem disk referenceTo: path]].
directory ifNil: [FileDirectory default asFSReference]]
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"nameForBuilderScript:" : "ct 1/17/2020 22:46",
"nameForBuilderWith:" : "ct 11/4/2019 00:54",
"okToGenerate" : "ct 9/22/2020 18:54",
"resourceDirectory" : "ct 11/18/2019 13:53",
"resourceDirectory" : "ct 3/17/2021 00:34",
"resourceDirectory:" : "ct 11/18/2019 13:53",
"runSuite:" : "ct 11/2/2019 03:26",
"totalSuite" : "ct 10/30/2019 11:02",
Expand Down
4 changes: 4 additions & 0 deletions SmalltalkSources/SBE-Tests.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
5 changes: 5 additions & 0 deletions SmalltalkSources/SBE-Tests.package/.squot-contents
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SquotTrackedObjectMetadata {
#objectClassName : #PackageInfo,
#objectsReplacedByNames : true,
#serializer : #SquotCypressCodeSerializer
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"category" : "SBE-Testing",
"category" : "SBE-Tests",
"classinstvars" : [
],
"classvars" : [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SystemOrganization addCategory: #'SBE-Tests'!
Empty file.
2 changes: 2 additions & 0 deletions SmalltalkSources/SBE-Tests.package/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
2 changes: 0 additions & 2 deletions build_scripts/prepareSuite.st → build_scripts/prepareFiguresSuite.st
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
[SBEFigureBuilder generateBuildersIn: SBEFigureBuilder resourceDirectory]
valueSuppressingMessages: #('*safety checks*').

SBEmain new setUp.
1 change: 1 addition & 0 deletions build_scripts/prepareTestingSuite.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SBEmain new setUp.
Loading