From 6a4d8d989db164de0cb035d00adef06df8c0926d Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Tue, 29 Dec 2020 11:41:29 +1100 Subject: [PATCH] Add cache step --- .github/workflows/pr.yml | 103 ------------------------------------- .github/workflows/push.yml | 48 ++++++++++++++++- 2 files changed, 46 insertions(+), 105 deletions(-) delete mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml deleted file mode 100644 index 6d1a9f32..00000000 --- a/.github/workflows/pr.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: CI PR - -on: [pull_request] - -jobs: - build_TS80: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: chmod - run: chmod +x setup.sh && chmod +x workspace/TS100/build.sh - - - name: setup - run: ./setup.sh - - - name: build TS80 - run: cd workspace/TS100 && ./build.sh -m TS80 - - - name: Archive TS80 artifacts - uses: actions/upload-artifact@v2 - with: - name: TS80 - path: | - workspace/TS100/Hexfile/TS80_*.hex - workspace/TS100/Hexfile/TS80_*.bin - if-no-files-found: error - build_TS80P: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: chmod - run: chmod +x setup.sh && chmod +x workspace/TS100/build.sh - - - name: setup - run: ./setup.sh - - - name: build TS80P - run: cd workspace/TS100 && ./build.sh -m TS80P - - - name: Archive TS80P artifacts - uses: actions/upload-artifact@v2 - with: - name: TS80P - path: | - workspace/TS100/Hexfile/TS80P_*.hex - workspace/TS100/Hexfile/TS80P_*.bin - if-no-files-found: error - build_TS100: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: chmod - run: chmod +x setup.sh && chmod +x workspace/TS100/build.sh - - - name: setup - run: ./setup.sh - - - name: build TS100 - run: cd workspace/TS100 && ./build.sh -m TS100 - - - name: Archive TS100 artifacts - uses: actions/upload-artifact@v2 - with: - name: TS100 - path: | - workspace/TS100/Hexfile/TS100_*.hex - workspace/TS100/Hexfile/TS100_*.bin - if-no-files-found: error - - build_Pinecil: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: chmod - run: chmod +x setup.sh && chmod +x workspace/TS100/build.sh - - - name: setup - run: ./setup.sh - - - name: build Pinecil - run: cd workspace/TS100 && ./build.sh -m Pinecil - - - name: Archive Pinecil artifacts - uses: actions/upload-artifact@v2 - with: - name: Pinecil - path: | - workspace/TS100/Hexfile/Pinecil_*.hex - workspace/TS100/Hexfile/Pinecil_*.bin - if-no-files-found: error - \ No newline at end of file diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2c2dfdf9..997d7d62 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,6 +1,6 @@ -name: CI PR +name: CI Build all -on: [push] +on: [push,pull_request] jobs: build_TS80: @@ -11,6 +11,17 @@ jobs: - name: chmod run: chmod +x setup.sh && chmod +x workspace/TS100/build.sh + + - name: Cached compiler source files + uses: actions/cache@v2 + env: + cache-name: cache-compilers + with: + # we deliberately persist a cache folder forwards + path: /build/cache + key: ${{ runner.os }}-build-${{ env.cache-name }} + restore-keys: | + ${{ runner.os }}- - name: setup run: ./setup.sh @@ -35,6 +46,17 @@ jobs: - name: chmod run: chmod +x setup.sh && chmod +x workspace/TS100/build.sh + - name: Cached compiler source files + uses: actions/cache@v2 + env: + cache-name: cache-compilers + with: + # we deliberately persist a cache folder forwards + path: /build/cache + key: ${{ runner.os }}-build-${{ env.cache-name }} + restore-keys: | + ${{ runner.os }}- + - name: setup run: ./setup.sh @@ -57,6 +79,17 @@ jobs: - name: chmod run: chmod +x setup.sh && chmod +x workspace/TS100/build.sh + + - name: Cached compiler source files + uses: actions/cache@v2 + env: + cache-name: cache-compilers + with: + # we deliberately persist a cache folder forwards + path: /build/cache + key: ${{ runner.os }}-build-${{ env.cache-name }} + restore-keys: | + ${{ runner.os }}- - name: setup run: ./setup.sh @@ -81,6 +114,17 @@ jobs: - name: chmod run: chmod +x setup.sh && chmod +x workspace/TS100/build.sh + + - name: Cached compiler source files + uses: actions/cache@v2 + env: + cache-name: cache-compilers + with: + # we deliberately persist a cache folder forwards + path: /build/cache + key: ${{ runner.os }}-build-${{ env.cache-name }} + restore-keys: | + ${{ runner.os }}- - name: setup run: ./setup.sh