From cf95a5d5b505dc443888e9a48a2ca864f9163ecd Mon Sep 17 00:00:00 2001 From: Romane Lafon Date: Fri, 14 Jun 2024 10:28:01 +0200 Subject: [PATCH] test cargo --- .github/workflows/main.yml | 52 ++++++++++++++------------------------ 1 file changed, 19 insertions(+), 33 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b2af92f..e1c2be8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ name: CI on: # Triggers the workflow on push or pull request events but only for the master branch push: - branches: [ master ] + branches: [ master, test_ga ] pull_request: branches: [ master ] @@ -16,6 +16,7 @@ jobs: build_and_test: # The type of runner that the job will run on runs-on: ubuntu-22.04 + container: nomalab/ffmpeg:5.0.1 continue-on-error: ${{ (matrix.rust == 'beta') || (matrix.rust == 'nightly') }} @@ -23,11 +24,14 @@ jobs: fail-fast: false matrix: rust: [ - 1.69.0, - 1.70.0, 1.71.0, 1.72.0, 1.73.0, + 1.74.0, + 1.75.0, + 1.76.0, + 1.77.0, + 1.78.0, stable, beta, nightly @@ -37,18 +41,6 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Install libs - run: >- - sudo apt-get update && - sudo apt-get install libasound2-dev libavcodec-dev - libavformat-dev libavutil-dev libavdevice-dev libavfilter-dev - libpostproc-dev libswscale-dev -y - - - name: Setup FFmpeg - uses: Iamshankhadeep/setup-ffmpeg@v1.2 - with: - version: "5.0" - - name: Install Rust uses: actions-rs/toolchain@v1 with: @@ -58,6 +50,8 @@ jobs: - name: Run cargo test run: cargo test + env: + PKG_CONFIG_PATH: "/ffmpeg_build/lib/pkgconfig:$PKG_CONFIG_PATH" fmt: runs-on: ubuntu-22.04 @@ -81,17 +75,11 @@ jobs: clippy: runs-on: ubuntu-22.04 + container: nomalab/ffmpeg:5.0.1 steps: - uses: actions/checkout@v3 - - name: Install libs - run: >- - sudo apt-get update && - sudo apt-get install libasound2-dev libavcodec-dev - libavformat-dev libavutil-dev libavdevice-dev libavfilter-dev - libpostproc-dev libswscale-dev -y - - name: Install Rust with clippy uses: actions-rs/toolchain@v1 with: @@ -102,24 +90,20 @@ jobs: - name: Run cargo clippy run: cargo clippy 2>&1 | tee ./clippy.out && ! grep -qe "error:\|warning:" ./clippy.out + env: + PKG_CONFIG_PATH: "/ffmpeg_build/lib/pkgconfig:$PKG_CONFIG_PATH" tarpaulin: runs-on: ubuntu-22.04 + container: + image: nomalab/ffmpeg:5.0.1 + options: --security-opt seccomp=unconfined steps: - uses: actions/checkout@v3 - - name: Install libs - run: >- - sudo apt-get update && - sudo apt-get install libasound2-dev libavcodec-dev - libavformat-dev libavutil-dev libavdevice-dev libavfilter-dev - libpostproc-dev libswscale-dev -y - - - name: Setup FFmpeg - uses: Iamshankhadeep/setup-ffmpeg@v1.2 - with: - version: "5.0" + # - name: Install libs + # run: apt install libssl-dev - name: Install Rust uses: actions-rs/toolchain@v1 @@ -135,4 +119,6 @@ jobs: - name: Run cargo-tarpaulin run: cargo tarpaulin -v --ciserver travis-ci --coveralls $GITHUB_JOB + env: + PKG_CONFIG_PATH: "/ffmpeg_build/lib/pkgconfig:$PKG_CONFIG_PATH"