From 466eaa3a72635b01cfc1be33e1c899e33147301a Mon Sep 17 00:00:00 2001 From: Elango Date: Tue, 12 May 2020 11:52:02 -0700 Subject: [PATCH 1/7] Create basic test/build Github Action for Rust --- .github/workflows/rust.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 00000000000..6738b0b2929 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,19 @@ +name: Rust + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose From 181617ba225fafdecf3ff08906f366565e6fd353 Mon Sep 17 00:00:00 2001 From: Elango Cheran Date: Tue, 12 May 2020 12:01:47 -0700 Subject: [PATCH 2/7] Add Rust build status badge to Readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bf4edcd99d1..18711f74f7b 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Welcome to the home page for the ICU4X-SC. We are a subcommittee of ICU-TC in t Please subscribe to this repository to participate in discussions. If you would like to join the core development team, apply to join [our mailing list](https://groups.google.com/a/unicode.org/forum/#!forum/omnicu-core). +![Rust](https://github.com/echeran/icu4x/workflows/Rust/badge.svg?branch=master) + ## Charter *For the full charter, including answers to frequently asked questions, see [charter.md](docs/charter.md).* From b791eecf92165381dd66838aa7aa0b80ddf1f33b Mon Sep 17 00:00:00 2001 From: Elango Cheran Date: Tue, 12 May 2020 12:39:56 -0700 Subject: [PATCH 3/7] add Cache action to speed up build steps --- .github/workflows/rust.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6738b0b2929..ddb4dbb1bbf 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,7 +13,31 @@ jobs: steps: - uses: actions/checkout@v2 + + ## Cache steps + + - name: Cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo build + uses: actions/cache@v1 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + + ## Build and run steps + - name: Build run: cargo build --verbose + - name: Run tests run: cargo test --verbose From 9849a29c19c960560889803019682bcbb96d4226 Mon Sep 17 00:00:00 2001 From: Elango Cheran Date: Tue, 12 May 2020 13:04:23 -0700 Subject: [PATCH 4/7] split builds by master and non-master branches --- .github/workflows/branch-build-test.yml | 43 +++++++++++++++++++ .../{rust.yml => master-build-test.yml} | 4 +- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/branch-build-test.yml rename .github/workflows/{rust.yml => master-build-test.yml} (94%) diff --git a/.github/workflows/branch-build-test.yml b/.github/workflows/branch-build-test.yml new file mode 100644 index 00000000000..58282fd4d26 --- /dev/null +++ b/.github/workflows/branch-build-test.yml @@ -0,0 +1,43 @@ +name: branch - Build & Test + +on: + push: + branches-ignore: [ master ] + pull_request: + branches-ignore: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + ## Cache steps + + - name: Cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo build + uses: actions/cache@v1 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + + ## Build and run steps + + - name: Build + run: cargo build --verbose + + - name: Test + run: cargo test --verbose diff --git a/.github/workflows/rust.yml b/.github/workflows/master-build-test.yml similarity index 94% rename from .github/workflows/rust.yml rename to .github/workflows/master-build-test.yml index ddb4dbb1bbf..d90e9917bc4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/master-build-test.yml @@ -1,4 +1,4 @@ -name: Rust +name: master - Build & Test on: push: @@ -39,5 +39,5 @@ jobs: - name: Build run: cargo build --verbose - - name: Run tests + - name: Test run: cargo test --verbose From 16ae4611738fbe94b36e17b77aee6cc541c0a171 Mon Sep 17 00:00:00 2001 From: Elango Cheran Date: Tue, 12 May 2020 13:30:53 -0700 Subject: [PATCH 5/7] make builds for master multi-OS and run for any branch PR --- .github/workflows/branch-build-test.yml | 2 -- .github/workflows/master-build-test.yml | 10 ++++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/branch-build-test.yml b/.github/workflows/branch-build-test.yml index 58282fd4d26..8dd7c06f4b0 100644 --- a/.github/workflows/branch-build-test.yml +++ b/.github/workflows/branch-build-test.yml @@ -3,8 +3,6 @@ name: branch - Build & Test on: push: branches-ignore: [ master ] - pull_request: - branches-ignore: [ master ] jobs: build: diff --git a/.github/workflows/master-build-test.yml b/.github/workflows/master-build-test.yml index d90e9917bc4..6b1b7e3f3b4 100644 --- a/.github/workflows/master-build-test.yml +++ b/.github/workflows/master-build-test.yml @@ -4,12 +4,18 @@ on: push: branches: [ master ] pull_request: - branches: [ master ] + branches: '*' jobs: build: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + + + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 From 202ddd53c792fc60f3c641da2d2f68a88fe31537 Mon Sep 17 00:00:00 2001 From: Elango Cheran Date: Tue, 12 May 2020 17:06:11 -0700 Subject: [PATCH 6/7] review fixups to consolidate master and other branches, fix badge URL --- .github/workflows/branch-build-test.yml | 41 ------------------- .../{master-build-test.yml => build-test.yml} | 2 +- README.md | 3 +- 3 files changed, 3 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/branch-build-test.yml rename .github/workflows/{master-build-test.yml => build-test.yml} (97%) diff --git a/.github/workflows/branch-build-test.yml b/.github/workflows/branch-build-test.yml deleted file mode 100644 index 8dd7c06f4b0..00000000000 --- a/.github/workflows/branch-build-test.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: branch - Build & Test - -on: - push: - branches-ignore: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - ## Cache steps - - - name: Cache cargo registry - uses: actions/cache@v1 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache cargo index - uses: actions/cache@v1 - with: - path: ~/.cargo/git - key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache cargo build - uses: actions/cache@v1 - with: - path: target - key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - - ## Build and run steps - - - name: Build - run: cargo build --verbose - - - name: Test - run: cargo test --verbose diff --git a/.github/workflows/master-build-test.yml b/.github/workflows/build-test.yml similarity index 97% rename from .github/workflows/master-build-test.yml rename to .github/workflows/build-test.yml index 6b1b7e3f3b4..426e4722529 100644 --- a/.github/workflows/master-build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,4 +1,4 @@ -name: master - Build & Test +name: Build & Test on: push: diff --git a/README.md b/README.md index 18711f74f7b..c07a298705d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ Welcome to the home page for the ICU4X-SC. We are a subcommittee of ICU-TC in t Please subscribe to this repository to participate in discussions. If you would like to join the core development team, apply to join [our mailing list](https://groups.google.com/a/unicode.org/forum/#!forum/omnicu-core). -![Rust](https://github.com/echeran/icu4x/workflows/Rust/badge.svg?branch=master) +![build & test](https://github.com/unicode-org/icu4x/workflows/master%20-%20Build%20&%20Test/badge.svg) + ## Charter From 61d0c66e48f3c95eef534a45adc15ca43d83eec8 Mon Sep 17 00:00:00 2001 From: Elango Cheran Date: Tue, 12 May 2020 17:33:41 -0700 Subject: [PATCH 7/7] fixes badge URL to match changed workflow name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c07a298705d..d0ef2ea03c7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Welcome to the home page for the ICU4X-SC. We are a subcommittee of ICU-TC in t Please subscribe to this repository to participate in discussions. If you would like to join the core development team, apply to join [our mailing list](https://groups.google.com/a/unicode.org/forum/#!forum/omnicu-core). -![build & test](https://github.com/unicode-org/icu4x/workflows/master%20-%20Build%20&%20Test/badge.svg) +![build & test](https://github.com/unicode-org/icu4x/workflows/Build%20&%20Test/badge.svg) ## Charter