Skip to content

Commit

Permalink
Merge pull request #307 from printfn/ubuntu-24
Browse files Browse the repository at this point in the history
Update pipeline to Ubuntu 24.04
  • Loading branch information
printfn authored Sep 4, 2024
2 parents 0b4c1c0 + e40ed72 commit 08bb08f
Show file tree
Hide file tree
Showing 5 changed files with 179 additions and 182 deletions.
45 changes: 23 additions & 22 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' }}
continue-on-error: true
run: |
RUSTFLAGS="-C instrument-coverage" \
Expand Down Expand Up @@ -138,7 +138,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 +166,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 +175,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 +191,52 @@ 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
sudo apt-get install -yq imagemagick
./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 +272,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 +321,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
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fend-core.workspace = true
home = "0.5.9"
rand = { version = "0.8.5", default-features = false, features = ["std", "std_rng"] }
rustyline = { version = "14.0.0", default-features = false, features = ["with-file-history", "custom-bindings"] }
serde = { version = "1.0.208", default-features = false }
serde = { version = "1.0.209", default-features = false }
toml = { version = "0.8.19", default-features = false, features = ["parse"] }
minreq = { version = "2.12.0", default-features = false, optional = true }

Expand Down
Loading

0 comments on commit 08bb08f

Please sign in to comment.