From f6ff075172355544e9cd3a736bd4563463a0e0eb Mon Sep 17 00:00:00 2001 From: printfn Date: Fri, 19 Jul 2024 23:15:25 +0000 Subject: [PATCH] Use Ubuntu 24.04 --- .github/workflows/actions.yml | 45 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 2d2d3097..83d8dff0 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -16,9 +16,9 @@ jobs: build: strategy: matrix: - platform: [ubuntu-latest, macos-14, windows-latest] + platform: [ubuntu-24.04, macos-14, windows-latest] include: - - platform: ubuntu-latest + - platform: ubuntu-24.04 artifact-path: target/release/fend artifact-platform-name: linux-x64 env-command: ">> $GITHUB_ENV" @@ -47,7 +47,7 @@ jobs: - uses: swatinem/rust-cache@v2 - name: Clippy, rustfmt - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} run: | rustup component add clippy cargo clippy --workspace --all-targets --all-features -- -D warnings @@ -75,12 +75,12 @@ jobs: # Only run unit tests on non-Linux platforms since Linux runs # them as part of code coverage testing - name: Test - if: ${{ matrix.platform != 'ubuntu-latest' }} + if: ${{ matrix.platform != 'ubuntu-24.04' }} run: | cargo test --workspace -- --nocapture --quiet - name: Test (Linux i686) - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} run: | sudo apt-get update -y sudo apt-get install -yq gcc-i686-linux-gnu @@ -90,7 +90,7 @@ jobs: --target i686-unknown-linux-gnu --no-default-features --features rustls --workspace -- --nocapture --quiet - name: Generate code coverage - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} run: | RUSTFLAGS="-C instrument-coverage" \ cargo test --workspace -- --quiet @@ -100,7 +100,6 @@ jobs: echo "rustc llvm version: $LLVM_VERSION" sudo ./llvm.sh "$LLVM_VERSION" rm llvm.sh - sudo apt-get install llvm-$LLVM_VERSION-tools "llvm-profdata-$LLVM_VERSION" merge -sparse */*.profraw -o fend.profdata "llvm-cov-$LLVM_VERSION" report \ --use-color \ @@ -138,7 +137,7 @@ jobs: ) >coverage.txt - name: Upload to codecov.io - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -166,7 +165,7 @@ jobs: if-no-files-found: error - name: Build (linux-armv7-gnueabihf) - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} run: | rustup target add armv7-unknown-linux-gnueabihf sudo apt-get install -yq gcc-arm-linux-gnueabihf @@ -175,14 +174,14 @@ jobs: - name: Upload artifacts (linux-armv7-gnueabihf) uses: actions/upload-artifact@v4 - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} with: name: fend-${{ env.FEND_VERSION }}-linux-armv7-gnueabihf path: target/armv7-unknown-linux-gnueabihf/release/fend if-no-files-found: error - name: Build (linux-aarch64-gnu) - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} run: | rustup target add aarch64-unknown-linux-gnu sudo apt-get install -yq gcc-aarch64-linux-gnu @@ -191,14 +190,14 @@ jobs: - name: Upload artifacts (linux-aarch64-gnu) uses: actions/upload-artifact@v4 - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} with: name: fend-${{ env.FEND_VERSION }}-linux-aarch64-gnu path: target/aarch64-unknown-linux-gnu/release/fend if-no-files-found: error - name: Build (linux-x86_64-musl) - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} run: | rustup target add x86_64-unknown-linux-musl sudo apt-get install -yq musl-tools @@ -206,36 +205,36 @@ jobs: - name: Upload artifacts (linux-x86_64-musl) uses: actions/upload-artifact@v4 - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} with: name: fend-${{ env.FEND_VERSION }}-linux-x86_64-musl path: target/x86_64-unknown-linux-musl/release/fend if-no-files-found: error - name: Set up Homebrew - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} run: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH - name: Build fend-wasm - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} run: | brew install pandoc curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh ./web/build.sh - name: Upload GitHub Pages artifact - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} uses: actions/upload-pages-artifact@v3 with: path: web/dist - name: Build man page - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} run: | ./documentation/build.sh - name: Upload man page - if: ${{ matrix.platform == 'ubuntu-latest' }} + if: ${{ matrix.platform == 'ubuntu-24.04' }} uses: actions/upload-artifact@v4 with: name: man-page @@ -271,20 +270,20 @@ jobs: if-no-files-found: error - name: Build telegram bot - if: ${{ github.ref == 'refs/heads/main' && matrix.platform == 'ubuntu-latest' }} + if: ${{ github.ref == 'refs/heads/main' && matrix.platform == 'ubuntu-24.04' }} run: | ./telegram-bot/build.sh - name: Upload artifacts (telegram bot) uses: actions/upload-artifact@v4 - if: ${{ github.ref == 'refs/heads/main' && matrix.platform == 'ubuntu-latest' }} + if: ${{ github.ref == 'refs/heads/main' && matrix.platform == 'ubuntu-24.04' }} with: name: lambda_package path: telegram-bot/lambda_package.zip if-no-files-found: error deploy_telegram: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: [build] if: ${{ github.ref == 'refs/heads/main' }} @@ -320,7 +319,7 @@ jobs: ./telegram-bot/deploy.sh deploy_website: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: [build] if: ${{ github.ref == 'refs/heads/main' }}