feat: autogen GH workflows and split build, test, and publish (#971)

Closes https://github.com/ooni/probe/issues/2337.
This commit is contained in:
Simone Basso 2022-10-03 14:20:54 +02:00 committed by GitHub
commit 5466f30526
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 990 additions and 142 deletions

34
GHGEN/ios.go Normal file
View file

@ -0,0 +1,34 @@
package main
//
// Generates iOS workflow.
//
import (
"io"
"github.com/ooni/probe-cli/v3/internal/runtimex"
)
func buildAndPublishMobileIOS(w io.Writer, job *Job) {
runtimex.Assert(len(job.ArchsMatrix) <= 0, "expected no architecture matrix")
buildJob := "build_ios_mobile"
artifacts := []string{
"./MOBILE/ios/oonimkall.xcframework.zip",
"./MOBILE/ios/oonimkall.podspec",
}
publishJob := "publish_ios_mobile"
newJob(w, buildJob, runsOnMacOS, noDependencies, noPermissions)
newStepCheckout(w)
newStepSetupGo(w, "ios")
newStepSetupPsiphon(w)
newStepMake(w, "EXPECTED_XCODE_VERSION=13.2.1 MOBILE/ios")
newStepUploadArtifacts(w, artifacts)
newJob(w, publishJob, runsOnUbuntu, buildJob, contentsWritePermissions)
newStepCheckout(w)
newStepDownloadArtifacts(w, artifacts)
newStepGHPublish(w, artifacts)
}