Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

GitHub Actions Patch (continuous integration testing & reproducible builds) #20

Closed
wants to merge 9 commits into from
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: CI
on:
[push, pull_request]

jobs:
build:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: CIprep
run: ./tools/scripts/ci/010_ciprep
- name: CIbuild
run: ./tools/scripts/ci/030_cibuild
- name: CItest-iphone8
run: |
xcodebuild clean test \
-project EN.xcodeproj \
-scheme ENCore \
-destination "platform=iOS Simulator,OS=latest,name=iPhone 8" \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
ONLY_ACTIVE_ARCH=NO
- name: CItest-iphone11
run: |
xcodebuild clean test \
-project EN.xcodeproj \
-scheme ENCore \
-destination "platform=iOS Simulator,OS=latest,name=iPhone 11" \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
ONLY_ACTIVE_ARCH=NO
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ build_swiftformat:
cd vendor/SwiftFormat && swift build -c release
$(shell sh tools/scripts/pre-commit.sh)

build_openssl:
cd vendor/OpenSSL-for-iPhone && ./build-libssl.sh && ./create-openssl-framework.sh

push_notification:
@xcrun simctl push booted nl.rijksoverheid.en tools/push/payload.apns

clean_snapshots:
@echo "Removing all __Snapshot__ folders"
@rm -rf `find Sources/ -type d -name __Snapshots__`
@echo "Re-run tests for current Snapshot tests to be generated"

build_openssl:
cd vendor/OpenSSL-for-iPhone && ./build-libssl.sh && ./create-openssl-framework.sh
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Covid19 Notification App - iOS

![build macOS-10.15](https://github.com/minvws/nl-covid19-notification-app-ios/workflows/build%20macOS-10.15/badge.svg)

This repository contains the iOS App of the Proof of Concept for the Dutch exposure notification app. We provide this code in an early stage so that everyone can follow along as we develop the app, and to solicit feedback. Note that due to the early stage in which we are sharing this code, significant portions of the code might still change. We might add or remove features and code as needed, based on validation and user tests that are conducted partially in parallel to the development.

* The iOS app is located in the repository you are currently viewing.
Expand All @@ -18,6 +20,10 @@ This increases the chance that we might be able to use your contribution (or it

Run `make dev` && `make project` to get started. Homebrew (https://brew.sh) is a requirement to install dependencies.

## Continuous Integration & reproducible builds

In order to facilitate CI and reproducible builds (https://github.com/minvws/nl-covid19-notification-app-coordination/issues/6) this codebase can be build using Github Actions.

## OpenSSL

Tihs project relies on OpenSSL to validate the KeySet signatures. OpenSSL binaries (v1.1.1d) are included and can be built using `make build_openssl`. By default the compiled binaries are part of the repo to reduce CI build times. Feel free to compile the binaries yourself.
Expand Down
14 changes: 14 additions & 0 deletions tools/scripts/ci/010_ciprep
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

#echo "*********************"
#echo "* install Homebrew *"
#echo "*********************"

#/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

#echo "*********************"
#echo "* install swift 5.2 *"
#echo "*********************"

#SWIFT_VERSION=5.2
#eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
9 changes: 9 additions & 0 deletions tools/scripts/ci/030_cibuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
echo "*********************"
echo "* Make dev *"
echo "*********************"
make dev
echo "*********************"
echo "* Make project *"
echo "*********************"
make project
8 changes: 8 additions & 0 deletions tools/scripts/ci/050_citest
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
echo "*********************"
echo "* CI tests *"
echo "*********************"

# swift test --enable-code-coverage

exit 0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CODE_SIGN_IDENTITY: iPhone Developer
CODE_SIGN_IDENTITY: Apple Development
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
6 changes: 6 additions & 0 deletions vendor/XcodeGen/Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import XCTest
@testable import ProjectTests

XCTMain([
testCase(SomeTests.allTests),
])