Skip to content

Commit

Permalink
Simplify the build and CI config
Browse files Browse the repository at this point in the history
This is a simple example project, we don't need to cross-build, we don't
need a plugin to generate the CI config, so simplify as much as
possible (and fix the CI which was broken).
  • Loading branch information
smarter committed Mar 30, 2021
1 parent dad09aa commit 2ca4b80
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 36 deletions.
28 changes: 5 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
# This file was automatically generated by sbt-github-actions using the
# githubWorkflowGenerate task. You should add and commit this file to
# your git repository. It goes without saying that you shouldn't edit
# this file by hand! Instead, if you wish to make changes, you should
# change your sbt build configuration to revise the workflow description
# to meet your needs, then regenerate this file.

name: Continuous Integration

on:
pull_request:
branches: ['*']
push:
branches: ['*']

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build:
name: Build and Test
run:
name: Build and Run
strategy:
matrix:
os: [ubuntu-latest]
scala:
- 3.0.0-RC1
- 3.0.0-RC2-bin-20210325-eeb8340-NIGHTLY
java:
- adopt@1.8.0-275
- adopt@1.11.0-9
- adopt@1.15.0-1
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
Expand All @@ -53,10 +40,5 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- run: sbt ++${{ matrix.scala }} run

- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck

- name: Build project
run: sbt ++${{ matrix.scala }} test
- name: Run project
- run: sbt run
12 changes: 1 addition & 11 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
lazy val rcVersion = "3.0.0-RC2"
lazy val crossVersions = Seq(Option(rcVersion)).flatten
lazy val root = project
.in(file("."))
.settings(
name := "scala3-example-project",
description := "Example sbt project that compiles using Scala 3",
version := "0.1.0",
scalaVersion := rcVersion,
crossScalaVersions := crossVersions,
skip in publish := true
scalaVersion := "3.0.0-RC2"
)

ThisBuild / githubWorkflowJavaVersions := Seq("adopt@1.8.0-275", "adopt@1.11.0-9", "adopt@1.15.0-1")
ThisBuild / githubWorkflowScalaVersions := crossVersions
ThisBuild / githubWorkflowBuildPreamble ++= Seq(WorkflowStep.Sbt(List("run")))
ThisBuild / githubWorkflowPublishTargetBranches := Nil
Global / onChangedBuildSource := ReloadOnSourceChanges
2 changes: 0 additions & 2 deletions project/plugins.sbt

This file was deleted.

0 comments on commit 2ca4b80

Please sign in to comment.