From f3a5c9e2c08c51715369224a28d566fb41b08361 Mon Sep 17 00:00:00 2001 From: Druue <tileyratkins@gmail.com> Date: Fri, 24 Apr 2020 16:03:29 +0200 Subject: [PATCH 01/10] Swapped out build file to use github actions instead of travis. --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5777400 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: Yellow + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Check Formatting + run: cargo fmt -- --check + - name: Build the Docker image + run: make setup + - name: Run tests + run: make test From 9dc9c9a11f9d633f98ca91911efbd7b9d23a258c Mon Sep 17 00:00:00 2001 From: Druue <tileyratkins@gmail.com> Date: Fri, 24 Apr 2020 16:04:00 +0200 Subject: [PATCH 02/10] Swapped out build file to use github actions instead of travis. --- .travis.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bb6d1b9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: rust -rust: - - stable - - beta - - nightly -jobs: - allow_failures: - - rust: nightly - fast_finish: true -cache: cargo - -before_install: - - sudo apt-get -qq update - - sudo apt-get install -y gcc pkg-config openssl libasound2-dev cmake build-essential python3 libfreetype6-dev libexpat1-dev libxcb-composite0-dev libssl-dev libx11-dev - -script: - - cargo build --verbose --all - - cargo test --verbose --all -after_success: - - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh - - chmod +x send.sh - - ./send.sh success $WEBHOOK_URL -after_failure: - - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh - - chmod +x send.sh - - ./send.sh failure $WEBHOOK_URL \ No newline at end of file From 8934e8ff32b6cb1c8ea3d2c4a72066b74e3bcafd Mon Sep 17 00:00:00 2001 From: Druue <tileyratkins@gmail.com> Date: Fri, 24 Apr 2020 16:17:10 +0200 Subject: [PATCH 03/10] Updated makefile to not use the interactive flag on run, build, and test --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3809645..565363f 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ DOCKER_IMAGE = yellow:latest run: - docker run --rm -it ${DOCKER_IMAGE} cargo run + docker run --rm ${DOCKER_IMAGE} cargo run build: - docker run --rm -it ${DOCKER_IMAGE} cargo build + docker run --rm ${DOCKER_IMAGE} cargo build test: - docker run --rm -it ${DOCKER_IMAGE} cargo test + docker run --rm ${DOCKER_IMAGE} cargo test setup: docker build -t yellow . From b77053c93e0b280f6fa42888d4621d3d873f7628 Mon Sep 17 00:00:00 2001 From: Druue <tileyratkins@gmail.com> Date: Fri, 24 Apr 2020 16:27:15 +0200 Subject: [PATCH 04/10] Swapped the build tag in the readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce79fcf..05dcfe6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Yellow - A simple Rust game -[](https://travis-ci.com/Druue/yellow) + More information will come.... From f31f14765bd6b835aeae4efc5aa991c358c0465f Mon Sep 17 00:00:00 2001 From: Druue <tileyratkins@gmail.com> Date: Fri, 24 Apr 2020 16:44:20 +0200 Subject: [PATCH 05/10] Updated ci.yml to use an action for building docker images with cache --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5777400..bfff6d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Build docker images using cache + uses: whoan/docker-build-with-cache-action@v5.0.1 + with: + image_name: yellow - name: Check Formatting run: cargo fmt -- --check - - name: Build the Docker image - run: make setup - name: Run tests run: make test From feb9074c7ec09120937713885c86f7b6104505d0 Mon Sep 17 00:00:00 2001 From: Druue <tileyratkins@gmail.com> Date: Fri, 24 Apr 2020 16:47:05 +0200 Subject: [PATCH 06/10] Updated to include dockerfile path in ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfff6d6..2a0940c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: uses: whoan/docker-build-with-cache-action@v5.0.1 with: image_name: yellow + dockerfile: ./Dockerfile - name: Check Formatting run: cargo fmt -- --check - name: Run tests From 8080fe4eb1b1922e732e88ca6e9d17a9c2749a48 Mon Sep 17 00:00:00 2001 From: Druue <tileyratkins@gmail.com> Date: Fri, 24 Apr 2020 16:53:19 +0200 Subject: [PATCH 07/10] Updated ci docker config --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a0940c..09d2884 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Build docker images using cache uses: whoan/docker-build-with-cache-action@v5.0.1 with: image_name: yellow From 8f2ab21d0117e5bb4853aa9e5101b8485f8c6efc Mon Sep 17 00:00:00 2001 From: Druue <tileyratkins@gmail.com> Date: Fri, 24 Apr 2020 16:54:33 +0200 Subject: [PATCH 08/10] Updated ci docker config --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09d2884..7f1405d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: whoan/docker-build-with-cache-action@v5.0.1 + - uses: whoan/docker-build-with-cache-action@v5.0.1 with: image_name: yellow - dockerfile: ./Dockerfile - name: Check Formatting run: cargo fmt -- --check - name: Run tests From c8ad878ad250fbbac89210fa15e7a85b9289c6b0 Mon Sep 17 00:00:00 2001 From: halvardssm <halvard@simplyundoable.com> Date: Fri, 24 Apr 2020 20:19:58 +0200 Subject: [PATCH 09/10] updated ci --- .github/workflows/ci.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f1405d..3a0ac8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,14 +8,17 @@ on: jobs: build: - runs-on: ubuntu-latest - steps: - - uses: whoan/docker-build-with-cache-action@v5.0.1 - with: - image_name: yellow - - name: Check Formatting - run: cargo fmt -- --check - - name: Run tests - run: make test + - name: Install dependencies + run: apt install gcc pkg-config openssl libasound2-dev cmake build-essential python3 libfreetype6-dev libexpat1-dev libxcb-composite0-dev libssl-dev libx11-dev + - name: Check Formatting + run: cargo fmt -- --check + - name: Build + run: cargo build --verbose --all + - name: Run tests + run: cargo test --verbose --all + - name: Discord notification + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + uses: Ilshidur/action-discord@master From 8e1fad65853d7ab118c169e28635749fb968ec5b Mon Sep 17 00:00:00 2001 From: halvardssm <halvard@simplyundoable.com> Date: Fri, 24 Apr 2020 20:21:41 +0200 Subject: [PATCH 10/10] testing other base image --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a0ac8a..34ec03c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: magnonellie/amethyst-dependencies:latest steps: - name: Install dependencies run: apt install gcc pkg-config openssl libasound2-dev cmake build-essential python3 libfreetype6-dev libexpat1-dev libxcb-composite0-dev libssl-dev libx11-dev