Skip to content

Commit

Permalink
Use Ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
printfn committed Jul 19, 2024
1 parent 681be76 commit f6ff075
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 \
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -191,51 +190,51 @@ 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
cargo build --release --package fend --no-default-features --features rustls --target x86_64-unknown-linux-musl
- 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
Expand Down Expand Up @@ -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' }}

Expand Down Expand Up @@ -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' }}

Expand Down

0 comments on commit f6ff075

Please sign in to comment.