From 056a07349256a1a4243b06740ac978ee3cc9867b Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 2 Aug 2022 10:27:24 +0300 Subject: [PATCH 1/5] rust platform build validation --- .github/workflows/rust.yml | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 705f301..9fcda19 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,15 +10,35 @@ env: CARGO_TERM_COLOR: always jobs: - build: + strategy: + matrix: + image: ['ubuntu:jammy', 'ubuntu:focal', 'ubuntu:bionic', 'ubuntu:xenial', 'centos:7', 'oraclelinux:8', 'debian:bullseye'] + build: + name: Linux ${{matrix.image}} x86 runs-on: ubuntu-latest + container: ${{matrix.image}} steps: - - uses: actions/checkout@v3 - - name: format - run: cargo fmt -- --check - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose -- --test-threads 1 + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: "${{matrix.image}}"-cargo-${{hashFiles('**/Cargo.lock')}} + - name: install rust + run: | + if [ -f /usr/bin/apt ]; then apt update -q ; apt install -y curl; fi + if [ -f /usr/bin/yum ]; then yum install -y curl; fi + curl https://sh.rustup.rs -O rusty.sh + sh ./rusty.sh -q -y + - name: format + run: ${HOME}/.cargo/bin/cargo fmt -- --check + - name: Build + run: ${HOME}/.cargo/bin/cargo build --verbose + - name: Run tests + run: ${HOME}/.cargo/bin/cargo test --verbose -- --test-threads 1 From 23a77418a69e013354a3c35cf0ec5aec81cd6ce2 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 2 Aug 2022 10:30:39 +0300 Subject: [PATCH 2/5] syntax --- .github/workflows/rust.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9fcda19..aa4015c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,10 +11,11 @@ env: jobs: - strategy: - matrix: - image: ['ubuntu:jammy', 'ubuntu:focal', 'ubuntu:bionic', 'ubuntu:xenial', 'centos:7', 'oraclelinux:8', 'debian:bullseye'] build: + strategy: + matrix: + image: ['ubuntu:jammy', 'ubuntu:focal', 'ubuntu:bionic', 'ubuntu:xenial', 'centos:7', 'oraclelinux:8', 'debian:bullseye'] + name: Linux ${{matrix.image}} x86 runs-on: ubuntu-latest container: ${{matrix.image}} @@ -29,7 +30,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: "${{matrix.image}}"-cargo-${{hashFiles('**/Cargo.lock')}} + key: ${{matrix.image}}-cargo-${{hashFiles('**/Cargo.lock')}} - name: install rust run: | if [ -f /usr/bin/apt ]; then apt update -q ; apt install -y curl; fi From 998a6b367467ad8cd986fb699bd2e69bc83d924b Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 2 Aug 2022 10:34:10 +0300 Subject: [PATCH 3/5] rh deps --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index aa4015c..685765d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -34,7 +34,7 @@ jobs: - name: install rust run: | if [ -f /usr/bin/apt ]; then apt update -q ; apt install -y curl; fi - if [ -f /usr/bin/yum ]; then yum install -y curl; fi + if [ -f /usr/bin/yum ]; then yum install -y curl tar zip; fi curl https://sh.rustup.rs -O rusty.sh sh ./rusty.sh -q -y - name: format From a6ba1e29f8bc6205fa5023a40b0d1dc958c5d7f8 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 2 Aug 2022 10:38:57 +0300 Subject: [PATCH 4/5] s/oracle/rocky --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 685765d..d7fa7c2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,7 +14,7 @@ jobs: build: strategy: matrix: - image: ['ubuntu:jammy', 'ubuntu:focal', 'ubuntu:bionic', 'ubuntu:xenial', 'centos:7', 'oraclelinux:8', 'debian:bullseye'] + image: ['ubuntu:jammy', 'ubuntu:focal', 'ubuntu:bionic', 'ubuntu:xenial', 'centos:7', 'rockylinux:8', 'debian:bullseye'] name: Linux ${{matrix.image}} x86 runs-on: ubuntu-latest @@ -35,7 +35,7 @@ jobs: run: | if [ -f /usr/bin/apt ]; then apt update -q ; apt install -y curl; fi if [ -f /usr/bin/yum ]; then yum install -y curl tar zip; fi - curl https://sh.rustup.rs -O rusty.sh + curl https://sh.rustup.rs -o rusty.sh sh ./rusty.sh -q -y - name: format run: ${HOME}/.cargo/bin/cargo fmt -- --check From f1ba23f5db3fe69c5a17d3c5c55d6f7756345fa6 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 2 Aug 2022 10:56:20 +0300 Subject: [PATCH 5/5] deps --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d7fa7c2..e06210e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -33,8 +33,8 @@ jobs: key: ${{matrix.image}}-cargo-${{hashFiles('**/Cargo.lock')}} - name: install rust run: | - if [ -f /usr/bin/apt ]; then apt update -q ; apt install -y curl; fi - if [ -f /usr/bin/yum ]; then yum install -y curl tar zip; fi + if [ -f /usr/bin/apt ]; then apt update -q ; apt install -y curl build-essential; fi + if [ -f /usr/bin/yum ]; then yum install -y curl gcc; fi curl https://sh.rustup.rs -o rusty.sh sh ./rusty.sh -q -y - name: format